1

I am using upstart 1.8-0ubuntu1 on Ubuntu-1210-quantal-64-minimal.

It shows me nginx to be running, when it's not.

# service nginx status
nginx start/running, process 2543
# ps -p 2543
PID TTY          TIME CMD

My config:

# 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=/opt/nginx/sbin/nginx
env PID=/opt/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
2
  • probably somehow .pid file is somewhere didn't get deleted. Sep 27, 2013 at 15:38
  • right so check if /opt/nginx/logs/nginx.pid exists and then compare it with "ps -waux | grep -i ngnix" Sep 27, 2013 at 15:46

0

You must log in to answer this question.

Browse other questions tagged .