Archive for the tag 'include'

How to include the crond service to chkservd

First we need to create a crond file under the chkservd.d directory where all the services files are placed:

vi /etc/chkserv.d/crond

Add the following line to the file:

service[crond]=x,x,x,/etc/init.d/crond restart,crond,root

Now we need to edit the chkservd configuration file and enable the crond service for monitoring

vi /etc/chkserv.d/chkservd.conf

add the following line at the end of the file

crond:1

Restart the chkservd service for the new changes to take affect:

/scripts/restartsrv chkservd

Stop the service manually and watch chkservd logs to verify auto-restart.

service crond stop; tail -f /var/log/chkservd.log

You should notice that the crond service is restarted automatically.