#!/bin/bash
if [ ! -d "ps -ef | grep /usr/sbin/squid3 -N -YC -f /etc/squid3/squid.conf" ]; then
/etc/init.d/squid3 status
/etc/init.d/squid3 start
#echo "$AMESS" | email -s "$ASUB" $AEMAIL
exit 1
else
/etc/init.d/squid3 status
#echo "$OK_MESS" | email -s "$ASUB" $AEMAILt 1
exit 1
fi
------------------------------------------------------------------------------------------------------------------------------
#crontab -e
add your script
if [ ! -d "ps -ef | grep /usr/sbin/squid3 -N -YC -f /etc/squid3/squid.conf" ]; then
/etc/init.d/squid3 status
/etc/init.d/squid3 start
#echo "$AMESS" | email -s "$ASUB" $AEMAIL
exit 1
else
/etc/init.d/squid3 status
#echo "$OK_MESS" | email -s "$ASUB" $AEMAILt 1
exit 1
fi
------------------------------------------------------------------------------------------------------------------------------
#crontab -e
add your script
0 comments:
Post a Comment