Skip to main content
Add precision about question situation
Source Link
Arkaik
  • 1.2k
  • 5
  • 20
  • 36

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 ?

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

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 ?

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 ?

Source Link
Arkaik
  • 1.2k
  • 5
  • 20
  • 36

System V - Respawn service but don't launch at boot

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

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 ?