Created
March 24, 2016 12:06
-
-
Save panchicore/26e56cca53e6c325a3bf to your computer and use it in GitHub Desktop.
pull when server starts. I use it when I run multiples intances, this is located in the supervisord config file of the AMI
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 | |
sleep 20 && cd /home/ubuntu/www/aquehorajuega.co/aquehorajuega && /usr/bin/git pull origin master && sudo supervisorctl restart aqhj |
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
[program:aqhj] | |
.... | |
[program:pull] | |
command=sh /home/ubuntu/pull.sh | |
user=ubuntu | |
autostart=true # run on supervisord startup | |
autorestart=false # but once on supervisord startup | |
stdout_logfile=/home/ubuntu/www/aquehorajuega.co/logs/pull.log | |
redirect_stderr=true | |
environment=HOME=/home/ubuntu,USER=ubuntu | |
priority=10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment