Viitor_clamav/etc/init.d/clamav

35 lines
517 B
Plaintext
Raw Normal View History

#!/bin/sh
source /etc/init.d/functions
case "$1" in
start)
echo "Starting clamd"
loadproc /usr/sbin/clamd
if [ -f /usr/sbin/clamav-milter ]; then
echo "Starting milter"
loadproc /usr/sbin/clamav-milter
fi
;;
stop)
if [ -f /usr/sbin/clamav-milter ]; then
echo "Stopping milter"
killproc /usr/sbin/clamav-milter
fi
echo "Stopping clamd"
killproc /usr/sbin/clamd
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0