Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1473 → Rev 1474

/scripts/alcasar-daemon.sh
2,7 → 2,7
# $Id$
 
# alcasar-daemon.sh
# by Franck BOUIJOUX
# by Franck BOUIJOUX & Rexy
# This script is distributed under the Gnu General Public License (GPL)
# Watchdog of Services
# See /etc/cron.d/alcasar-daemon-watchdog for config the time
10,20 → 10,18
conf_file="/usr/local/etc/alcasar.conf"
SSH=`grep SSH= $conf_file|cut -d"=" -f2` # sshd active (on/off)
SSH=${SSH:=off}
SERVICE="sshd httpd chilli radiusd mysqld dansguardian dnsmasq dnsmasq-blacklist dnsmasq-whitelist havp havp2 freshclam ntpd master"
SERVICES="mysqld httpd ntpd iptables dnsmasq dnsmasq-blacklist dnsmasq-whitelist dnsmasq-blackhole radiusd nfsen dansguardian freshclam ulogd-ssh ulogd-traceability ulogd-ext-access chilli fail2ban sshd"
 
function ServiceTest () {
CMD=`pidof $s`
if [ -z "$CMD" ]
then
service $s restart
# else
# echo "Service $s is On on PID : $CMD"
systemctl start $s.service
fi
}
 
 
for s in $SERVICE
for s in $SERVICES
do
if [ $s != "sshd" ]
then