Upstart conf changes do not reload after edit

After I make some changes to an upstart conf file upstart does not reload the new changes until I reboot the system

start on filesystem or runlevel [23]
stop on runlevel [6] 

respawn 
expect fork 

script 
    echo "Starting gunicorn.." > /tmp/upstart_t 
    exec /srv/sms/mwav_messenger/gunicorn_start.sh 
end script 

console output

If I was to alter this script I would continue to get the original behaviour. Further to this if I stop or start the script manually the commandline simply hangs and I need to control-c to get back to the commandline.

Cheers.


Solution 1:

Changes to Upstart scripts apply when all running instances of that job have stopped. Thus modifying a conf file and doing sudo restart job will run it with old values. You need to sudo stop job, then sudo start job to have new conf file in effect.

Bonus: sudo stop job getting stuck at such script means you have wrong expect stanza defined. See Cookbook section on expect for more info on this. tl;dr, likely it is extra and can be removed.