Skip to content

Instantly share code, notes, and snippets.

@simplyadrian
Created May 12, 2015 06:41
Show Gist options
  • Save simplyadrian/d9bf4b6011a9b7370a6b to your computer and use it in GitHub Desktop.
Save simplyadrian/d9bf4b6011a9b7370a6b to your computer and use it in GitHub Desktop.
a bash script to install php
#!/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