Changed to debian:stretch as a base

This commit is contained in:
Deon George
2018-01-30 22:41:32 +11:00
parent 74ef5e19b8
commit a5c9084f93
4 changed files with 25 additions and 253 deletions

13
init
View File

@@ -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