Last active
September 5, 2015 15:45
-
-
Save rosy1280/514261 to your computer and use it in GitHub Desktop.
start up script for moodle
This file contains 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 | |
# | |
# start up script for moodle | |
# | |
############################### | |
# Define the Variables | |
############################### | |
CURRENT_URL="example.com/moodle" | |
NEW_URL=`wget -q -O - http://169.254.169.254/latest/meta-data/public-hostname` | |
#for debugging | |
#echo $CURRENT_URL | |
#echo $NEW_URL | |
/usr/bin/ec2-set-hostname | |
#echo `hostname` | |
sed -e 's|'$CURRENT_URL'|'$NEW_URL'|' </var/www/moodle/config-dist.php >/var/www/moodle/config.php |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment