I run into an issue with upstart where I want to update an init config, but just restarting the job doesn't apply the changes.
For example:
- I've got job
xyz
running - I modify the
/etc/init/xyz.conf
to do something inpre-stop
. - The job gets restarted with
restart xyz
pre-stop
part is not executed
I tried reloading the config with initctl reload-configuration
, but it didn't have any effect. If I manually stop and start the job in two separate steps, things work as expected.
According to the documentation, the pre-stop stanza is only executed before a stop command, not during a (warm) restart.
Depending on what you are trying to do you may not be able to avoid this behavior.