6 # source application-specific settings
7 [ -f /etc
/conf.d
/clamav
] && .
/etc
/conf.d
/clamav
9 PID_FC
=`pidof -o %PPID /usr/bin/freshclam`
10 PID_CD
=`pidof -o %PPID /usr/sbin/clamd`
14 # if clamd isn't started first, notifyclamd fails at times
15 if [ "$START_CLAMD" == "yes" ]; then
16 stat_busy
"Starting ClamD"
17 [ -z "$PID_CD" ] && /usr
/sbin
/clamd
26 # give clamd enough time to start
29 if [ "$START_FRESHCLAM" == "yes" ]; then
30 stat_busy
"Starting FreshClam"
31 [ -z "$PID_FC" ] && /usr
/bin
/freshclam
-p /var
/run
/clamav
/freshclam.pid
-d $FRESHCLAM_OPTS
41 if [ "$START_CLAMD" == "yes" ]; then
42 stat_busy
"Stopping ClamD"
43 [ -n "$PID_CD" ] && kill $PID_CD &> /dev
/null
52 if [ "$START_FRESHCLAM" == "yes" ]; then
53 stat_busy
"Stopping FreshClam"
54 [ -n "$PID_FC" ] && kill $PID_FC &> /dev
/null
65 # will not start if not fully stopped, so sleep
70 echo "usage: $0 {start|stop|restart}"