Changed to debian:stretch as a base
This commit is contained in:
13
init
13
init
@@ -5,15 +5,20 @@ NAME="CLAMAV"
|
||||
|
||||
function stop {
|
||||
echo "Stopping ${NAME}"
|
||||
kill $(cat /var/run/clamd.pid)
|
||||
kill $(cat /var/run/clamav-milter.pid)
|
||||
kill $(cat /var/run/clamav/clamd.pid)
|
||||
}
|
||||
|
||||
trap 'stop' SIGTERM
|
||||
|
||||
if [ "$1" == "start" ]; then
|
||||
[ -x /usr/sbin/clamd -a -x /usr/bin/freshclam ] && /usr/bin/freshclam --config-file=/etc/clamav/freshclam.conf && /usr/sbin/clamd -c /etc/clamav/clamd.conf
|
||||
[ -x /usr/sbin/clamav-milter ] && /usr/sbin/clamav-milter -c /etc/clamav/clamav-milter.conf &
|
||||
chown -R clamav:clamav /var/lib/clamav
|
||||
|
||||
[ -f /var/lib/clamav/daily.cvd ] || /usr/bin/freshclam
|
||||
|
||||
# Update Daemon
|
||||
/usr/bin/freshclam -dc 6
|
||||
|
||||
[ -x /usr/sbin/clamd ] && /usr/sbin/clamd &
|
||||
|
||||
wait
|
||||
else
|
||||
|
Reference in New Issue
Block a user