On Sun, 28 Nov 2004 12:07:02 -0500, "Tom" <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] sbin]# /sbin/service clamd restart
>clamd: unrecognized service
>
chkconfig --add clamd
chkconfig --levels 345 clamd on
/sbin/service clamd start
This assumes that you have the file /etc/init.d/clamd.
# cat /etc/init.d/clamd
#!/bin/sh
#
# clamd Script to start/stop clamd.
#
# chkconfig: - 61 39
# description: clamd is an antivirus daemon.
#
# processname: clamd
# config: /etc/clamd.conf
# pidfile: /var/run/clamav/clamd.pid
# Source function library
. /etc/rc.d/init.d/functions
# Get network config
. /etc/sysconfig/network
test -f /etc/clamd.conf || exit 0
RETVAL=0
start() {
echo -n $"Starting Clam AV daemon: "
daemon /usr/sbin/clamd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
return $RETVAL
}
stop() {
echo -n $"Stopping Clam AV daemon: "
killproc clamd
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/run/clamav/clamd.pid
/var/lock/subsys/clamd
return $RETVAL
}
restart() {
stop
start
}
reload() {
echo -n $"Reloading DB: "
killproc clamd -USR2
RETVAL=$?
echo
return $RETVAL
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status clamd
;;
restart)
restart
;;
condrestart)
[ -f /var/lock/subsys/clamd ] && restart || :
;;
reload)
reload
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
exit 1
esac
exit $?
--
Steve
_______________________________________________
http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users