|
Shell Script to Auto Run PHP Script
Hello All!
I am looking to build a monitoring script.
The script should always run as a system service of some type and should always check that a PHP script is running.
Maybe there is a way to assign a PHP script to a certain PID so that the monitor script that check for the PID in top and then if the PID does not exist, then have it run the PHP script.
Basically, I have built a PHP script the constantly monitors two sets of databases to verify that they remain the same and if one DB changes it writes it to the other.
There are MANY MANY reasons for it be done this way versus other possible ways. Mainly because of other functions this script does that due to lots of fun legal paperwork I can't disclose.
So, all in all...
Need a bash/shell script that will constantly check for my PHP script to make sure it is running and make it run if it doesn't exist.
I'm just tired of having a putty window open and my internet dieing and killing the script.
Any help or pointing in the right direction would be of tremendous help.
Thank you for your time!!!
|