[clamav-users] RedHat 8.0 Startup

2003-01-18 Thread Geoff Sweet
Does anyone have a nice how-to or script for starting clamav on
start-up?  I am using Red Hat 8.0 and am just unfimiliar with how to set
this kind of thing up.

Thanks
Geoff


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [clamav-users] RedHat 8.0 Startup

2003-01-18 Thread Geoff Sweet
I figured this one out, and for anyone who cares all I was missing was a
link to the startup script in my /etc/rc.d/rcX.d directory.  So I added
add a link called S50clamd in the rc3.d, and linked it to
/etc/rc.d/init.d/clamd script.  Works like a charm.  If anyone is
curious I have attached the script that I used, I hope this list server
doesn't strip attachments.  Thanks very much to all that replied to my
request though!!

Geoff


On Fri, 2003-01-17 at 22:16, Geoff Sweet wrote:
> Does anyone have a nice how-to or script for starting clamav on
> start-up?  I am using Red Hat 8.0 and am just unfimiliar with how to set
> this kind of thing up.
> 
> Thanks
> Geoff
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

#! /bin/bash
#
# crond  Start/Stop the clam antivirus daemon.
#
# chkconfig: 2345 90 60
# description: clamdis a standard UNIX program that scans for Viruses.
# processname: clamd
# config: /usr/local/etc/clamd.conf
# pidfile: /var/lock/subsys/clamd

# Source function library.
. /etc/init.d/functions

RETVAL=0

# See how we were called.
progdir=/usr/local/sbin  
prog="clamd"

# Source configuration
if [ -f /etc/sysconfig/$prog ] ; then
. /etc/sysconfig/$prog
fi

start() {
	echo -n $"Starting $prog: "
	daemon $progdir/$prog
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/clamd
	return $RETVAL
}

stop() {
	echo -n $"Stopping $prog: "
	killproc $prog
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/clamd
	return $RETVAL
}	

rhstatus() {
	status clamd
}	

restart() {
  	stop
	start
}	

reload() {
	echo -n $"Reloading clam daemon configuration: "
	killproc clamd -HUP
	retval=$?
	echo
	return $RETVAL
}	

case "$1" in
  start)
  	start
	;;
  stop)
  	stop
	;;
  restart)
  	restart
	;;
  reload)
  	reload
	;;
  status)
  	rhstatus
	;;
  condrestart)
  	[ -f /var/lock/subsys/clamd ] && restart || :
	;;
  *)
	echo $"Usage: $0 {start|stop|status|reload|restart|condrestart}"
	exit 1
esac

exit $?
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]