Commit 8c88f09b authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

freshclam should start clamav-daemon service on successful update

parent 73774dfd
......@@ -29,6 +29,7 @@ all: freshclam-config clamd-config
install -d -m755 -o clamav -g clamav /usr/share/clamav
sed -i '/^\[Service\]$$/a RestartSec=5s' /lib/systemd/system/clamav-daemon.service
sed -i '/^\[Service\]$$/a Restart=on-failure' /lib/systemd/system/clamav-daemon.service
@echo "clamav ALL = NOPASSWD: /bin/systemctl start clamav-daemon.service" > /etc/sudoers.d/clamav
@echo "$$FRESHCLAM_CONFIG" > /etc/freshclam.conf
systemctl enable clamav-freshclam
@echo "$$CLAMD_CONFIG" > /etc/clamd.conf
......@@ -38,6 +39,7 @@ all: freshclam-config clamd-config
freshclam-config:
define FRESHCLAM_CONFIG
DatabaseMirror database.clamav.net
OnUpdateExecute systemctl --quiet is-enabled clamav-daemon.service; [ $$? -eq 0 ] && systemctl --quiet is-active clamav-daemon.service; [ $$? -ne 0 ] && sudo systemctl start clamav-daemon.service
endef
export FRESHCLAM_CONFIG
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment