2

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 in pre-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.

1 Answer 1

2

According to the documentation, the pre-stop stanza is only executed before a stop command, not during a (warm) restart.

Description: Command executed when a job in running state gets stopped (initctl stop or stop on event). 

Depending on what you are trying to do you may not be able to avoid this behavior.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .