Fixes #11603.
Signed-off-by: Stefan Schantl stefan.schantl@ipfire.org --- clamav/clamav.nm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
diff --git a/clamav/clamav.nm b/clamav/clamav.nm index 14765e000..f941bc6b9 100644 --- a/clamav/clamav.nm +++ b/clamav/clamav.nm @@ -82,9 +82,42 @@ packages %{name}-libs = %{thisver} end
+ configfiles + %{sysconfdir}/clamd.conf + %{sysconfdir}/freshclam.conf + end + + prerequires + systemd-units + end + script prein %{create_users} end + + script postin + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl enable clamav-freshclam.service >/dev/null 2>&1 || : + systemctl enable clamav-daemon.service >/dev/null 2>&1 || : + end + + script preun + systemctl --no-reload disable clamav-freshclam.service >/dev/null 2>&1 || : + systemctl --no-reload disable clamav-daemon.service >/dev/null 2>&1 ||: + + systemctl stop clamav-freshclam.service.service >/dev/null 2>&1 || : + systemctl stop clamav-daemon.service >/dev/null 2>&1 || : + end + + script postun + systemctl daemon-reload >/dev/null 2>&1 || : + end + + script postup + systemctl daemon-reload >/dev/null 2>&1 || : + systemctl try-restart clamav-freshclam.service >/dev/null 2>&1 || : + systemctl try-restart clamav-daemon.service >/dev/null 2>&1 || : + end end
package %{name}-libs