Skip to content

Instantly share code, notes, and snippets.

@thegoleffect
Forked from progrium/gist:5734609
Created May 3, 2014 21:25
Show Gist options
  • Save thegoleffect/2c7e1141399956077006 to your computer and use it in GitHub Desktop.
Save thegoleffect/2c7e1141399956077006 to your computer and use it in GitHub Desktop.
# run this as root
while [ 1 ]; do echo | nc -l -U /tmp/reload_nginx && /etc/init.d/nginx reload; done
# or as an upstart job
script
echo | nc -l -U /tmp/reload_nginx && /etc/init.d/nginx reload
end script
respawn
# now any process can run this or do the equivalent with sockets to trigger reload
nc -U /tmp/reload_nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment