Welcome! Log In Create A New Profile


Nginx and upstart

April 02, 2013 02:43PM

I'm using the following script to keep nginx up and running:

start on (filesystem and net-device-up IFACE=lo)
stop on runlevel [!2345]

env DAEMON=/usr/sbin/nginx
env CONF=/etc/nginx/nginx.conf
env PID=/var/run/nginx.pid

respawn limit 10 5

pre-start script
if [ $? -ne 0 ]; then
exit $?
end script

exec $DAEMON -c $CONF -g "daemon off;" > /dev/null 2>&1

It works fine except if I kill the master process with eg. kill -5. If I kill it with kill command the pid keeps changing every few seconds. Any idea how to fix this?
Subject Author Posted

Nginx and upstart

skrode April 02, 2013 02:43PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 103
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready