Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 2 down vote accepted

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.

share|improve this answer
well spotted, thanks – viraptor Apr 12 '12 at 15:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.