#!/bin/bash
CHECK=`netstat -nltp |grep 80 |grep httpd |wc -l`
if [ $CHECK -ge "1" ]; then
echo ""
else
# apache restart
`/etc/init.d/apachectl restart`
fi
exit
#!/bin/bash
CHECK=`netstat -nltp |grep 80 |grep httpd |wc -l`
if [ $CHECK -ge "1" ]; then
echo ""
else
# apache restart
`/etc/init.d/apachectl restart`
fi
exit