2014-07-31 17:52:04 +02:00
|
|
|
# nginx
|
2017-12-12 21:10:51 +01:00
|
|
|
|
2014-07-31 17:52:04 +02:00
|
|
|
description "nginx http daemon"
|
|
|
|
author "George Shammas <georgyo@gmail.com>"
|
2017-12-12 21:10:51 +01:00
|
|
|
|
2017-01-20 20:33:06 +01:00
|
|
|
start on (runlevel [345] and started network)
|
|
|
|
stop on (runlevel [!345] or stopping network)
|
2017-12-12 21:10:51 +01:00
|
|
|
|
2014-07-31 17:52:04 +02:00
|
|
|
env DAEMON=/usr/sbin/nginx
|
2017-12-12 21:10:51 +01:00
|
|
|
|
2014-07-31 17:52:04 +02:00
|
|
|
expect fork
|
|
|
|
respawn
|
|
|
|
respawn limit 10 5
|
|
|
|
#oom never
|
2017-12-12 21:10:51 +01:00
|
|
|
|
2014-07-31 17:52:04 +02:00
|
|
|
pre-start script
|
|
|
|
$DAEMON -t
|
|
|
|
if [ $? -ne 0 ]
|
|
|
|
then exit $?
|
|
|
|
fi
|
|
|
|
end script
|
2017-12-12 21:10:51 +01:00
|
|
|
|
2014-07-31 17:52:04 +02:00
|
|
|
exec $DAEMON
|