Skip to content

Instantly share code, notes, and snippets.

@Unitech
Created June 14, 2014 12:35
Show Gist options
  • Save Unitech/fe7496e4bed74a341bf6 to your computer and use it in GitHub Desktop.
Save Unitech/fe7496e4bed74a341bf6 to your computer and use it in GitHub Desktop.
/etc/init/nginx.conf
# nginx
description "nginx http daemon"
author "George Shammas <[email protected]>"
start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]
env DAEMON=/usr/bin/nginx
env PID=/usr/local/nginx/logs/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