# Upstart after nginx update not working

**URL:** <https://www.ruby-forum.com/t/upstart-after-nginx-update-not-working/236518>\
**Category:** NGINX\
**Created:** [September 10, 2013, 1:21pm UTC](https://www.ruby-forum.com/t/upstart-after-nginx-update-not-working/236518 "2013-09-10T13:21:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alcina](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/a587f6/32.png) [@alcina](https://www.ruby-forum.com/u/alcina)\
**Post date:** [September 10, 2013, 1:21pm UTC](https://www.ruby-forum.com/t/upstart-after-nginx-update-not-working/236518/1 "2013-09-10T13:21:40Z")

</div>

hi  
i’ve created the upstart with the following config

# nginx

description “nginx http daemon”  
author “George S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)”

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

env DAEMON=/usr/sbin/nginx  
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

And thats how i made the nginx update

#Basically it boils down to the following:  
#Get PID of old master process by inspecting output of ps:  
ps auxwww | grep nginx

#Now, install the new binary:  
wget [http://nginx.org/download/nginx-](http://nginx.org/download/nginx-).tar.gz  
tar -xzf nginx-.tar.gz  
cd nginx-  
./configure   
–sbin-path=/usr/sbin/nginx   
–conf-path=/etc/nginx/nginx.conf   
–pid-path=/var/run/nginx.pid   
–lock-path=/var/lock/subsys/nginx   
–error-log-path=/var/log/nginx/error.log   
–http-log-path=/var/log/nginx/access.log   
–with-http\_ssl\_module   
–with-http\_stub\_status\_module   
–with-http\_geoip\_module   
–http-client-body-temp-path=/var/cache/nginx/client\_body\_temp   
–http-proxy-temp-path=/var/cache/nginx/proxy\_temp   
–http-fastcgi-temp-path=/var/cache/nginx/fastcgi\_tempmake  
make  
sudo make install

#Advise old master process to start a new master process using the  
updated  
binary:  
sudo kill -s USR2 2941

#Gracefully shut down old worker processes:  
sudo kill -s WINCH 2941

#Gracefully exit old master process:  
sudo kill -s QUIT 2941

So after the update the Upstart is’nt working anymore for nginx. I have  
to  
stop the service manually and start it again.

Posted at Nginx Forum:

> **[upstart after nginx update not working](https://forum.nginx.org/read.php?2,242719,242719#msg-242719)**
>
> hi i've created the upstart with the following config # nginx description "nginx http daemon" author "George Shammas \<georgyo@gmail.com\>" start on (filesystem and net-device-up IFACE=lo) stop on runlevel \[!
