Created
June 1, 2012 00:08
-
-
Save lilith/2847400 to your computer and use it in GitHub Desktop.
Boot script for EC2 instances
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/sh | |
sudo yum update -y | |
cd /var/www/html/ | |
#Update git repo and checkout the appropriate branch | |
if [ -r /var/www/html/.git/HEAD ]; then | |
su -s /bin/sh apache -c "git remote rm origin" | |
su -s /bin/sh apache -c "git remote add origin git@github.com:lensnetllc/direct-lens.git" | |
su -s /bin/sh apache -c "git pull origin master" | |
su -s /bin/sh apache -c "git checkout master" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment