Comment 2 for bug 695937

Revision history for this message
Matt Zimmerman (mdz) wrote :

If I've read your transcript correctly, what's confused you is that upstart's restart(8) action has different semantics than the traditional init.d "restart". In particular, if the job is NOT running and you issue a restart(8) through upstart, it will fail, rather than start the job.

This is apparently by design, and documented:

       restart
              JOB [KEY=VALUE]...

              Requests that an instance of the named JOB be restarted, out‐
              putting the status of the job to standard output when the com‐
              mand completes.

              See status for a description of the output format and start for
              a discussion on instances.

              Note that this command can only be used when there is an
              instance of JOB, if there is none then it returns an error
              instead of starting a new one.

...but I find it confusing as well and am not sure why it works this way.