I've had the displeasure of bitterly realizing that (after a few days) upon rebooting of my system, that init.d scripts written by myself were not executed. This caused a bit of problems, but I think I've fixed it.
So now, I would like write up a script in which I will install to the crontab that will check if the init.d scripts are working or not.
Q: How does one check if init.d scripts are working? Or see a list of the init.d scripts working?
The Idea: Check if the init.d scripts are running, if not, send out an email, to notify myself, that for some reason the init.d script has failed.
chkconfig --list <serviceName>
to see what run levels it's enabled for but other than that your init script should implement something when it's givenstatus
instead of astop
orstart
so that you can do things likeservice serviceName status
to check to see if it's still running. Ultimately, the person writing the initscript needs to know how to figure out if it's still running./etc/rc.local
.