Cent OS 6 - auto start a failed service

General support questions
Post Reply
Nkumar
Posts: 4
Joined: 2018/10/08 13:45:32

Cent OS 6 - auto start a failed service

Post by Nkumar » 2018/10/08 13:52:58

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?

User avatar
TrevorH
Forum Moderator
Posts: 27127
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Cent OS 6 - auto start a failed service

Post by TrevorH » 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?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
CentOS 5 has been EOL for nearly 3 years and should no longer be used for anything!
Full time Geek, part time moderator. Use the FAQ Luke

Nkumar
Posts: 4
Joined: 2018/10/08 13:45:32

Re: Cent OS 6 - auto start a failed service

Post by Nkumar » 2018/11/23 13:30:27

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'.

Post Reply

Return to “CentOS 6 - General Support”