diff --git a/install/vst-install-debian.sh b/install/vst-install-debian.sh index 20ee17ed..514863a0 100755 --- a/install/vst-install-debian.sh +++ b/install/vst-install-debian.sh @@ -1045,6 +1045,13 @@ if [ "$clamd" = 'yes' ]; then mkdir /var/run/clamav fi chown -R clamav:clamav /var/run/clamav + if [ -f "/etc/systemd/system/multi-user.target.wants/clamav-daemon.service" ]; then + file="/etc/systemd/system/multi-user.target.wants/clamav-daemon.service" + if [ $( grep -ic "mkdir" $file ) -eq 0 ]; then + sed -i "s/\[Service\]/\[Service\]\nExecStartPre = \/bin\/mkdir -p \/var\/run\/clamav\nExecStartPre = \/bin\/chown -R clamav:clamav \/var\/run\/clamav/g" $file + fi + fi + service clamav-daemon start check_result $? "clamav-daeom start failed" fi