diff --git a/install_amavis.sh b/install_amavis.sh index 0202cd2..266cc53 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -3082,6 +3082,26 @@ else fi fi +# - Since Debian 13 the package clamav-freshclam also ships (and enables) +# - clamav-freshclam-once.timer / clamav-freshclam-once.service. Together +# - with the freshclam daemon (clamav-freshclam.service) both try to lock +# - /var/log/clamav/freshclam.log at the same time and one of them fails. +# - Keep only the daemon. +# - +echononl " Disable clamav-freshclam-once (timer/service).." +if $systemd_exists && systemctl cat clamav-freshclam-once.service > /dev/null 2>&1 ; then + systemctl disable --now clamav-freshclam-once.timer clamav-freshclam-once.service > /dev/null 2> $tmp_err_msg + if [[ $? -eq 0 ]] ; then + systemctl reset-failed clamav-freshclam-once.service > /dev/null 2>&1 + echo_ok + else + echo_failed + error "$(cat $tmp_err_msg)" + fi +else + echo_skipped +fi + echononl " Initial run of freshclam.." freshclam > /dev/null 2> $tmp_err_msg if [[ $? -eq 0 ]] ; then