Skip to content

Instantly share code, notes, and snippets.

@ehlertij
Created June 8, 2012 18:36
Show Gist options
  • Save ehlertij/2897488 to your computer and use it in GitHub Desktop.
Save ehlertij/2897488 to your computer and use it in GitHub Desktop.
proxy_up
# proxy_up.sh
#!/bin/bash
echo 'Starting emproxy...'
sudo monit start all -g emproxy_ngin
echo 'Sleeping for 5s before reloading haproxy...'
sleep 5
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:81)/HOSTNAME:8080/g' /etc/haproxy.cfg"
/data/ngin/shared/bin/haproxy_add
echo 'Done'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment