(root)//scripts/alcasar-daemon.sh – Rev 807
Go to most recent revision |
Details |
Last modification |
View Log
| Rev |
Author |
Line No. |
Line |
| 807 |
franck |
1 |
#!/bin/sh
|
|
|
2 |
# $Id: alcasar-bl.sh 412 2011-01-03 21:40:09Z richard $
|
|
|
3 |
|
|
|
4 |
# alcasar-watchdog.sh
|
|
|
5 |
# by Franck BOUIJOUX
|
|
|
6 |
# This script is distributed under the Gnu General Public License (GPL)
|
|
|
7 |
# Watchdog of Services
|
|
|
8 |
# See /etc/cron.d/alcasar-daemon-watchdog for config the time
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
SERVICE="httpd chilli radiusd mysqld dansguardian dnsmasq havp ntpd squid master"
|
|
|
12 |
|
|
|
13 |
for s in $SERVICE
|
|
|
14 |
do
|
|
|
15 |
CMD=`pidof $s`
|
|
|
16 |
if [ -z "$CMD" ]
|
|
|
17 |
then
|
|
|
18 |
service $s restart
|
|
|
19 |
else
|
|
|
20 |
echo "Service $s is On on PID : $CMD"
|
|
|
21 |
fi
|
|
|
22 |
done
|