need help to write script to check the process health and automatically restart it
I write a small program, which need to constantly be watched, and check its status, if it was dead, it should be restart automatically.
Please kindly refer me to URL which teach how to write this kind of script, or service.
maybe have a look at monit
will have back up and look for non-GUI tool or just script template
Thanks for your advice.
I am looking for a non-GUI tool or at best, just a script, may be a script template.
Here is a script that will look for a process called Test every second and if it is stopped for some reason will restart it. Something like this may work for you.
PROCESS='ps -A | grep Test'
if [ "$PROCESS" = "" ]
|All times are GMT -5. The time now is 11:18 AM.|