Webmin (Virtualmin) has great service monitoring capabilities, restarting any failed services that it detects. Unfortunately, it cannot and does not monitor or restart itself it it crashes.

Unfortunately, since Webmin has no central executable (being a Perl script), scanning for it in the process list is not the easiest task to perform via a bash script.

Still, since on (most) Linux systems it comes with a service manager, this can be used to check its status.

The script below was tested and works on CentOS (and should work on all compatible systems: Fedora, RHEL)

 

The script can be saved to a file, chmod-ed 777 and then set as a periodic cron job.

Leave a Reply