Created
June 8, 2012 18:37
-
-
Save ehlertij/2897495 to your computer and use it in GitHub Desktop.
proxy_down
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
# proxy_down.sh | |
#!/bin/bash | |
echo 'Reloading haproxy...' | |
/data/ngin/shared/bin/haproxy_remove | |
ssh -o StrictHostKeyChecking=no -i /home/deploy/.ssh/internal deploy@APP_MASTER "sudo sed -i -r 's/(HOSTNAME:8080)/HOSTNAME:81/g' /etc/haproxy.cfg" | |
/data/ngin/shared/bin/haproxy_add | |
echo 'Sleeping for 5s before stopping emproxy...' | |
sleep 5 | |
echo 'Stopping emproxy...' | |
sudo monit stop all -g emproxy_ngin | |
echo 'Done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment