Page 1 of 1

Cent OS 6 - auto start a failed service

Posted: 2018/10/08 13:52:58
by Nkumar
Hi,
I have a service running on Cent OS 6.9. The service is enabled to auto-start on server boot. Now, I want to ensure that there should be a mechanism to auto-start the service if it is in failed state at any time while system is up and running. I know in cent OS 7, there is a feature to do this in the service script using below command in the service script -
**Restart=on-failure**.

How can I achieve the same in Cent OS 6.9?

Re: Cent OS 6 - auto start a failed service

Posted: 2018/10/08 15:26:46
by TrevorH
First, 6.9 is out of date. Run yum update to get up to date on 6.10.

I suspect you'll want to find a third party utility to do this - perhaps 'monit' from EPEL?

Re: Cent OS 6 - auto start a failed service

Posted: 2018/11/23 13:30:27
by Nkumar
TrevorH wrote:
2018/10/08 15:26:46
First, 6.9 is out of date. Run yum update to get up to date on 6.10.

I suspect you'll want to find a third party utility to do this - perhaps 'monit' from EPEL?
Thanks Trevor. I will have a look on 'monit'.