[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shell script problem
The folowing shell script is supposed to check whether pnserver is running and
if it isn't to restart it. It resides in /usr/local/pnserver. If I run it when
I'm in that directory it works fine, but if I'm in a different directory (e.g.
/root) it won't work. Any idea what I'm doing wrong?
#!/bin/sh
numps=`ps xa | grep pnserver | wc -l`
if test $numps -lt "2"
then
/usr/local/pnserver/bin/pnserver /usr/local/pnserver/server.cfg
fi
--
Whole Pop Magazine Online - this issue Motorcycles & Teddy Bears
Pop Culture, Games and more at http://www.wholepop.com/
Itamar, itamars@ibm.net