#!/bin/bash if [`pgrep apache2 -c` -le "0" ]; then /etc/init.d/apache2 stop pkill -u www-data /etc/init.d/apache2 sta +rt echo "restarting....." SUBJECT="Apache auto restart" # Email To ? EMAIL="me@mydomain.com" # Email text/message EMAILMESSAGE="apache auto restart done" # send an email using /bin/mail /bin/mail -s "$SUBJECT" "$EMAIL" " +$EMAILMESSAGE" fi
In reply to Re^2: Apache restart
by Anonymous Monk
in thread Apache restart
by perNewuser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |