#!/bin/sh # # Startup script for ClamAV # # chkconfig: - 61 39 # description: clamav antivirus daemon # processname: clamd # config: /etc/clamd.conf # # Source function library . /etc/rc.d/init.d/functions # Get network config . /etc/sysconfig/network if [ -f /etc/sysconfig/clamd ]; then . /etc/sysconfig/clamd fi PATH="$PATH:/usr/local/sbin" # See how we were called. case "$1" in start) echo -n "Starting clamd: " daemon /usr/sbin/clamd echo touch /var/lock/subsys/clamd ;; stop) echo -n "Shutting down clamd: " killproc clamd echo rm -f /var/lock/subsys/clamd ;; status) status clamd ;; restart) $0 stop $0 start ;; reread|reload) echo -n "Re-reading clamd config: " killproc clamd -HUP echo ;; *) echo -n "Usage: $0 {start|stop|restart|status|reread|reload" exit 1 esac exit 0