Oh, besides (or instead of) using the -w flag, you might also consider just
shorting the width of the output lines. Since you don't need all the
information between the user and command fields, you could just use:

if ( ps -ax -o user,command | grep -iq "^root.*master" ) ; then

Another possibility arises when a daemon writes its own process id into
/var/run/ when it starts up, and removes it on termination. So, you could
possibly test for the existence of the .pid file, such as:

if [ -f /var/run/master.pid ] ; then

Hope this helps.

Paul

-- 
Paul A. Scott
mailto:[EMAIL PROTECTED]
http://skycoast.us/pscott/


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message

Reply via email to