Hey guys,
I found this thread
http://www.linuxquestions.org/questi...unning-625589/ but the code is a bit beyond me.
I am looking for assistance in creating a script that does the following (written in the style of PHP):
If (program A is running and program B is running) {
do nothing
}
elseif (program A is not running and program B is runnning) {
term program B
start program A
sleep 120
start program B
}
elseif (program A is running and program B is not running) {
start program B
}
I intend to run the script via crontab every hour.
The reason for the script is because program a tends to crash randomly (it terms itself) and program b is an interface to program A. When program A dies program B has to be restarted when program A is back running.
i am using Ubuntu 10.04 LTS.
Thanks for your help.