#!/bin/sh # Start/stop/restart clamav. # $Id: rc.clamav,v 1.1 2007/02/14 10:29:03 root Exp root $ # Author: Eric Hameleers # --------------------------------------------------------------------------- # Slightly modified by Robby Workman # to replace backticks ( s/`command`/$(command)/ ) # modified my Dimitris Tzemos # Start clamav: clamav_start() { if [ -x /usr/sbin/clamd ]; then echo -n "Starting clamd daemon: /usr/sbin/clamd " /usr/sbin/clamd echo "." fi } # Stop clamav: clamav_stop() { kill $(cat /var/run/clamd.pid) } # Restart clamav: clamav_restart() { clamav_stop sleep 1 clamav_start } case "$1" in 'start') clamav_start ;; 'stop') clamav_stop ;; 'restart') clamav_restart ;; *) echo "usage $0 start|stop|restart" esac