Skip to content

Instantly share code, notes, and snippets.

@durdn
Created May 12, 2012 16:17
Show Gist options
  • Save durdn/2667403 to your computer and use it in GitHub Desktop.
Save durdn/2667403 to your computer and use it in GitHub Desktop.
Upstart Configuration for nginx
# nginx
description "nginx http daemon"
author "George Shammas <georgyo@gmail.com>"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON="/data/apps/nginx/sbin/nginx -c /data/apps/nginx/conf/nginx.conf"
env PID=/var/run/nginx.pid
expect fork
respawn
respawn limit 10 5
#oom never
pre-start script
$DAEMON -t
if [ $? -ne 0 ]
then exit $?
fi
end script
exec $DAEMON
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment