minor tweaks to get the automated git pull working

pull/1/head
Ed Summers 2011-11-11 04:07:33 +00:00
parent 9824d093f2
commit 2876f9db4e
1 changed files with 6 additions and 2 deletions

View File

@ -1,9 +1,13 @@
#!/bin/bash
# put this in one of root's crontabs and it'll refresh and restart regluit
# this script is used by jenkins to remotely update a regluit instance
# for it to work the jenkins user's public ssh key needs to be in the
# authorized key for the machine running the regluit instance
# you can then put something like this in a post build configuration
# ssh ubuntu@please.unglueit.com "/opt/regluit/deploy/update-regluit"
cd /opt/regluit
sudo -u ubuntu -c "git pull"
sudo -u ubuntu /usr/bin/git pull
source ENV/bin/activate
django-admin.py syncdb --migrate --settings regluit.settings.prod
sudo /etc/init.d/apache2 restart