Create Auto respawn Daemon

Use /etc/inittab to have init watch a program or script and start it over if it fails. Here is an example entry:

Here is an example to run as non-root
zz:12345:respawn:/usr/bin/sudo -u user1 /path/to/my_daemon


  • zz code mut be unique in inittab for each process; 12345 represents run levels to include
  • Comment out entry in inittab if want to stop daemon
  • After changes to inittab you need to ‘kill -HUP’ init process

Comments are closed.

%d bloggers like this: