Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
535 B

#!/bin/sh
pidfile=`sed -nre 's/^PidFile (.+)$/\1/p' /etc/clamd.conf`
case "$1" in
start)
/usr/sbin/clamd
;;
stop)
[ -f "$pidfile" ] && kill -TERM `cat $pidfile`
;;
restart)
$0 stop
sleep 1
$0 start
;;
reload)
[ -f "$pidfile" ] && kill -USR2 `cat $pidfile`
;;
status)
if [ -f "$pidfile" ] && kill -0 `cat $pidfile` ; then
echo "ClamAV is running."
else
echo "ClamAV is not running."
fi
;;
*)
echo "usage: $0 {start|stop|restart|reload}"
exit 1
esac