sabrina2020
sabrina2020

Reputation: 2472

centOS 6.6 and centos 7: auto restart a service if it stopped

what is the best approach to restart a service automatically when it stopped in centos 6.6 and centos 7?

Upvotes: 1

Views: 1347

Answers (1)

Murad Tagirov
Murad Tagirov

Reputation: 816

In CentOS 7, you have to edit service file. Find the [Service] section in service file. And add following option:

Restart=on-abort

of like this:

Restart=always

Upvotes: 2

Related Questions