0 Members and 3 Guests are viewing this topic.
p="process name"while true; do /path/to/process/to/run; while [ "$(ps -C $p | grep $p)" != "" ]; do sleep 3; done;done;
You could just do something like this:Code: [Select]p="process name"while true; do /path/to/process/to/run; while [ "$(ps -C $p | grep $p)" != "" ]; do sleep 3; done;done;I haven't tested it but with some tweaking I'm pretty sure it should do what you want.
Quote from: Eeems on February 08, 2012, 08:00:43 pmYou could just do something like this:Code: [Select]p="process name"while true; do /path/to/process/to/run; while [ "$(ps -C $p | grep $p)" != "" ]; do sleep 3; done;done;I haven't tested it but with some tweaking I'm pretty sure it should do what you want.Okay I think it's working! Okay sorry it's NOT working. I can't find what the process would be.
Well if I remember correctly it would probably be the name of the script/binary you are running. You could try changing it to ps -A instead, it's just less precise.
Oh it's a php bot? How are you running it?
Netham45 appears to have the same problems for his OmnomIRC it seems. I wonder if your script could actually fix our split channel problems Eeems? (so we don't have to rely on AaronBot or Jimbauwen every few week or so)
Quote from: DJ_O on February 09, 2012, 02:22:00 pmNetham45 appears to have the same problems for his OmnomIRC it seems. I wonder if your script could actually fix our split channel problems Eeems? (so we don't have to rely on AaronBot or Jimbauwen every few week or so)You seriously rely on AaronBot? That thing is buggy! I used it as a relay and it kept getting mixed up and ended up relaying other peoples channels to mine.