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
Site Admin
Posts: 33202
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?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
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