[plug] results in variable

James Devenish devenish at guild.uwa.edu.au
Sun Aug 24 21:26:27 WST 2003


In message <sf492b48.097 at mmtnetworks.com.au>
on Sun, Aug 24, 2003 at 09:16:46PM +0800, Jon  Miller wrote:
> ps aux | grep -i postfix and I get various lines:

Perhaps you could try pgrep (available in the 'procps' package for
Linux). For instance: `pgrep -U postfix > /dev/null` will exit with a
return code of 0 if there are postfix processes or 1 if there are none.
So, you can then check the value of the $? variable -- if it is zero
then postfix is running, otherwise postfix is not.




More information about the plug mailing list