WHAT'S NEW?
Loading...

[Centos] how to restart services on failure

You just need to add these two lines to the .service file. Under the [Service] section in the file you must add the following 2 lines:
Restart=always
RestartSec=3
After saving the file we need to reload the daemon configurations to ensure systemd is aware of the new file
systemctl daemon-reload
Then restart the service to enable the changes.
systemctl restart yourservicename

0 comments:

Post a Comment