This is the code:
description "NZBGet upstart script"
setuid martin
setgid martin
start on runlevel [2345]
stop on runlevel [016]
respawn
pre-start script
exec /home/martin/nzbget/nzbget -D
end script
pre-stop script
exec /home/martin/nzbget/nzbget -Q
end script
Program starts fine. However, it never seems to stop. sudo service nzbget stop
indicates nzbget stopping/waiting
but the line exec /home/martin/nzbget/nzbget -Q
never appears to get executed. Any ideas how to fix this problem?
script
block orexec
line? Why is there arespawn
line when there is nothing to respawn?script
orexec
block, how can Upstart know what process belonged to the daemon proper? Processes stated by pre-start/post-stop blocks aren't tracked by Upstart.