Subversion Repositories ALCASAR

Rev

Rev 1393 | Rev 1474 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 1393 Rev 1395
Line 1... Line 1...
1
#!/bin/sh
1
#!/bin/sh
2
# $Id: alcasar-daemon.sh 1393 2014-06-19 08:44:51Z richard $
2
# $Id: alcasar-daemon.sh 1395 2014-06-19 16:13:27Z richard $
3
 
3
 
4
# alcasar-daemon.sh
4
# alcasar-daemon.sh
5
# by Franck BOUIJOUX
5
# by Franck BOUIJOUX
6
# This script is distributed under the Gnu General Public License (GPL)
6
# This script is distributed under the Gnu General Public License (GPL)
7
# Watchdog of Services
7
# Watchdog of Services
8
# See /etc/cron.d/alcasar-daemon-watchdog for config the time
8
# See /etc/cron.d/alcasar-daemon-watchdog for config the time
9
 
9
 
10
conf_file="/usr/local/etc/alcasar.conf"
10
conf_file="/usr/local/etc/alcasar.conf"
11
SSH=`grep SSH= $conf_file|cut -d"=" -f2`				# sshd active (on/off)
11
SSH=`grep SSH= $conf_file|cut -d"=" -f2`				# sshd active (on/off)
12
SSH=${SSH:=off}
12
SSH=${SSH:=off}
13
SERVICE="sshd dnsmasq httpd chilli radiusd mysqld dansguardian dnsmasq havp havp2 freshclam ntpd squid master squid"
13
SERVICE="sshd httpd chilli radiusd mysqld dansguardian dnsmasq dnsmasq-blacklist dnsmasq-whitelist havp havp2 freshclam ntpd master"
14
 
14
 
15
function ServiceTest () {
15
function ServiceTest () {
16
	 CMD=`pidof $s`
16
	 CMD=`pidof $s`
17
	 if [ -z "$CMD" ]
17
	 if [ -z "$CMD" ]
18
	 then
18
	 then