respawn syntax?

Asked by Quentin Stafford-Fraser

It looks, from the log files and examples, as if the respawn syntax has changed?

I used to do
  respawn <command>

Now I think I should do

  exec <command>
  respawn

Is that right? I couldn't see any documentation about respawning anywhere - I may have missed it...

Question information

Language:
English Edit question
Status:
Solved
For:
upstart Edit question
Assignee:
No assignee Edit question
Solved by:
Quentin Stafford-Fraser
Solved:
Last query:
Last reply:
Revision history for this message
Quentin Stafford-Fraser (quentinsf) said :
#1

Oh, and PS, Scott -

upstart is wonderful! Many thanks!

Revision history for this message
Stu Hood (stuhood) said :
#2

I remember Scott mentioning it in the release notes for Upstart 0.3.7. You have the correct syntax!

----------------------------------------------------------------------------
* The "respawn COMMAND" short-cut for specifying both "respawn" and
   "exec" in the same stanza has been removed. Jobs that previously
   used syntax such as:

       respawn /sbin/getty 38400 tty1

   Should be changed to use:

       exec /sbin/getty 38400 tty1
       respawn

   While the shortcut saved a little typing, it caused confusion and
   hid the fact that "exec" and "script" were both options for
   respawning services.

Revision history for this message
Best Quentin Stafford-Fraser (quentinsf) said :
#3

Many thanks Stu.

I don't think there's any reference in the docs at the moment to the fact that respawn is even possible...