Automatically restarting the crash Linux daemon

I have a Linux server application that I was able to “deploy” as a daemon, which can be started automatically when the machine starts, regardless of user sessions.

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

Thanks in advance.

+4
source share
2 answers

Look at monit , it keeps track of any service / daemon. You need to configure Monit to find out what criteria to use to start / stop or send an email if something goes wrong / weird.

+1
source

What you need is a process manager, a utility that manages your daemon and decides when to start / stop it by the way.

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

Hope this helps.

+1
source

All Articles