1

I have around between 3 and 8 upstart jobs in various Ubuntu boxes that I wish to easily start, stop or restart all together. It seems that upstart would make it easy to do that, but I'm not sure how.

Should I use dependencies to make a single dummy job that depends on all the others? One of my requirements is that I wish to still be able to stop some without them restarting because others are started. How should I go about doing this?

Pablo Fernandez
  • 7,438
  • 25
  • 71
  • 83

1 Answers1

0

I resolved by creating a dummy master job (/etc/init/master_job.conf):

description "master_job"

start on filesystem or runlevel [2345]
stop on runlevel [!2345]

respawn

and the others start and stop on it (/etc/init/other_job.conf):

start on starting master_job
stop on stopping master_job
Pablo Fernandez
  • 7,438
  • 25
  • 71
  • 83