0

I'm trying to have a System V service relaunched on exit.

EDIT: Should have precised that I'm using busybox init system instead of classic systemV

I found that It could be done using /etc/inittab with the keyword respawn as action (man inittab).

respawn
The process will be restarted whenever it terminates (e.g. getty).

This seems to be the right action to set, however with respawn the service will be launched at boot.

I would like to have this service restarted but only after it has been launched from command line.

Is this possible to configure the service to respawn but not to be launched at boot ?

2
  • Not that I can think of. init typically knows when to restart it because it started it to begin with and gets a signal when it terminates. I don't know of a way to have it monitor some "other" process. Commented Jun 25, 2018 at 16:57
  • The respawn in inittab will always run it on boot. I don't think that solution is going to yield the results you want. I'd take a look at possibly doing something with supervisord or GOD. Commented Jun 25, 2018 at 22:47

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.