#!/bin/sh # # # chkconfig: 2345 75 40 # description: Starts and stops clamd. # processname: clamd # pidfile: /var/run/clam/clamd.pid # securlevel: 40 # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 # See how we were called. case "$1" in start) echo -n "Clamd: " daemon /usr/local/sbin/clamd && touch /var/lock/subsys/clamd echo "" ;; stop) echo -n "Shutting down clamd: " killproc clamd echo rm -f /var/lock/subsys/clamd echo "" ;; restart) echo -n "Restarting clamd: " $0 stop $0 start echo "done." ;; status) status clamd ;; fresh_clam) echo -n " Fresh Clam: " /usr/local/bin/freshclam ;; *) echo "Usage: qmail {start|stop|restart|status|fresh_clam}" exit 1 esac exit 0