Skip to content

Instantly share code, notes, and snippets.

Created Aug 25, 2012
What would you like to do?
nginx upstart
# nginx
description "nginx http daemon"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/bin/nginx
env PID=/usr/local/nginx/logs/
expect fork
respawn limit 10 5
#oom never
pre-start script
if [ $? -ne 0 ]
then exit $?
end script
exec $DAEMON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment