Created
May 12, 2015 06:41
-
-
Save simplyadrian/d9bf4b6011a9b7370a6b to your computer and use it in GitHub Desktop.
a bash script to install php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
# | |
# Test for a reboot, if this is a reboot just skip this script. | |
# | |
if test "$RS_REBOOT" = "true" -o "$RS_ALREADY_RUN" = "true" ; then | |
logger -t RightScale "Php Modules Install, skipped on a reboot." | |
exit 0 | |
fi | |
if [[ "$RS_DISTRO" =~ ubuntu ]]; then | |
apt-get install -y php5-cli php-pear $OPT_PHP_MODULES_LIST | |
elif [[ "$RS_DISTRO" =~ centos|redhat.* ]]; then | |
yum install -y php-cli php-pear $OPT_PHP_MODULES_LIST | |
fi | |
logger -t RightScale "Installed Php Modules." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment