Reputation: 2472
what is the best approach to restart a service automatically when it stopped in centos 6.6 and centos 7?
Upvotes: 1
Views: 1347
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