4

I have a Linux server application that I managed to "deploy" as a daemon that can be started automatically when the machine starts, independently of user sessions..

I wonder if it is possible to tell the system to automatically restart the application when it crashes, like the service manager in Windows..

Thank you in advance.

charfeddine.ahmed
  • 526
  • 2
  • 8
  • 16

2 Answers2

1

What you need is a process supervisor, a utility that manages your daemon and decides when to start/stop it among other things.

There are several of these out there such as supervisord, upstart, runit etc. You will have to research them and find one that best suits your needs.

Hope that helps.

RMo
  • 132
  • 7
  • You can try to use daemontools, which is available in most of linux/unix distros and provides a portable way for supervising daemons – Ivan Baidakou Mar 21 '15 at 23:40
1

Give it a look to monit, it monitors any service/daemon. You have to configure Monit in order to know what criteria to use to start/stop or email you in case something wrong/strange is going on.

zerick
  • 126
  • 1
  • 2