1

I have a single project foo consisting of several daemons e.g. foo-web, foo-worker and for-cleanup. For each of them I have a very simple Upstart script, allowing me to use commands like service foo-web start.

What I really want is to have another Upstart script to control the whole application at once. So I can use service foo restart to relaunch the whole thing and have start on, stop on and respawn stanzas written only once for the entire project.

How can I achieve such behaviour?

vbo
  • 13,583
  • 1
  • 25
  • 33

1 Answers1

1

I personally use upstart/system V scripts to manage single daemon.

For more complex operations like the one above(group few services together and start them as one service), I use monit. Upstart scripts are too low level.

Monit has more features and benefits.

  • Looking promising. Could you please provide a control file example that solves my particular problem? – vbo Feb 12 '14 at 20:16
  • https://gist.github.com/deep-thought-42/9020178#file-monit_group_example is an example monit conf file. With this setup, you can do "monit -g foo start", "monit -g foo stop", "monit -g foo restart" – deepthought42 Feb 15 '14 at 14:52