Stefan Troeger wrote:
Hi,
On Wed, Feb 23, 2000 at 02:59 +0100, Rogier Maas wrote:
I don't suppose inetd has that function.. I was more thinking of something to really see if something is running or not, like I run setiathome. This program *definately* has no status function, but it shows up in ps. Would this do the trick:
STATUS=`ps aux | grep -c -e "setiathome"` [ $STATUS -eq 0 ] && /usr/local/setiathome
Or could I do:
[ `ps aux | grep -c -e "setiathome"` -eq 0 ] && /usr/local/seti/setiathome
?
Both work. A more straightforward version is
/sbin/checkproc /path/of/executable || echo "It's not running"
Ciao, Stefan
HAHAH!! I KNEW it! Thanks Stefan! Rogier -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/