Running freebsd-7.0

I use a small script in a jail to check if Apache is running and if not, restart it.

#if ps -ax | grep -v grep | grep -i httpd
#    echo "Apache is alive......"
#    echo "Apache is dead, but will be launched."
#/usr/local/etc/rc.d/apache22 start

However, if I want to check the host's Apache, ps -ax sees all of the "httpd" lines including the jail and the host:

(Jail) 83787 ?? SsJ 0:07.71 /usr/local/sbin/httpd -DSSL -DNOHTTPACCEPT
(host) 98089  ??  Ss    32:49.44 /usr/local/sbin/httpd -DNOHTTPACCEPT

How can I modify my script to see only the host based on the bottom line above?

Help appreciated!


_______________________________________________ mailing list
To unsubscribe, send any mail to ""

Reply via email to