Update of /cvsroot/devil-linux/build/scripts/scripts
In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv32514/scripts/scripts
Added Files:
freshclam
Log Message:
- updated sarg to 2.2.3
- added init script to start freshclam daemon (Kari Mattsson + Heiko)
- added Data::Dumper 2.121
- added Log::Agent 0.307
- added MLDBM 2.01
- added gifsicle 1.44.tar.gz
- updated libungif to 4.1.4
- updated openldap to 2.3.31
- updated samba to 3.0.23d
- updated snort to 2.6.1.2
- updated squid to 2.6.STABLE6
--- NEW FILE: freshclam ---
#!/bin/bash
#
# $Source: /cvsroot/devil-linux/build/scripts/scripts/freshclam,v $
# $Revision: 1.2 $
# $Date: 2006/12/28 15:37:45 $
#
# http://www.devil-linux.org
#
### BEGIN INIT INFO
# Provides: freshclam
# Required-Start: $network $syslog $named
# Required-Stop: $network $syslog $named
# Default-Start: 3 5
# Default-Stop: 0 6
# Description: starts clamav virus signature update daemon
### END INIT INFO
# settings
source /etc/sysconfig/config
# parameters
NAME="Freshclam daemon"
CONFIGNAME=FRESHCLAM
DAEMON=/usr/bin/freshclam
PARAMETER="--quiet --daemon"
# source function library
source /etc/init.d/functions
eval START=\$START_$CONFIGNAME
# Determine the base and follow a runlevel link name.
base=${0##*/}
link=${base#*[SK][0-9][0-9]}
# Force execution if not called by a runlevel directory.
test $link = $base && START=yes
test "$START" = "yes" || exit 0
if [ ! -e $DAEMON ]; then
echo
echo "$DAEMON not found. Did you install the package?"
exit 1
fi
case "$1" in
start)
if [ "$UPDATE_CLAMAV" = "yes" ]; then
test -n "$UPDATE_CLAMAV_USER" && PARAM="--proxy-user $UPDATE_CLAMAV_USER"
test -n "$UPDATE_CLAMAV_PROXY" && PARAM="$PARAM --http-proxy $UPDATE_CLAMAV_PROXY"
echo -n "Updating ClamAV Virus signatures: "
/usr/bin/freshclam --quiet -l /var/log/freshclam.log $PARAM
# exit codes 0 & 1 indicate success
if [ $? -lt 2 ]; then
print_status success
else
print_status failure
fi
fi
echo -n "Starting $NAME: "
loadproc $DAEMON $PARAMETER
;;
stop)
echo -n "Shutting down $NAME: "
killproc $DAEMON
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac
|