Reinhard Max 2018-04-18 11:48:19 +00:00 committed by Git OBS Bridge
parent c0e27f9707
commit f9901db0ae

View File

@ -199,11 +199,11 @@ getent passwd vscan >/dev/null || \
%post
systemd-tmpfiles --create %_tmpfilesdir/clamav.conf
%service_add_post clamd.service freshclam.service clamav-milter.service
%if $1 == 2; then
test $1 -eq 2 &&
# If upgrading, comment out obsolete config file options
# https://bugzilla.clamav.net/show_bug.cgi?id=12097
sed -i '/^[[:space:]]*SubmitDetectionStats/s/^/# OBSOLETE: /' /etc/freshclam.conf
%endif
grep -q '^[[:space:]]*SubmitDetectionStats' /etc/freshclam.conf &&
sed -i '/^[[:space:]]*SubmitDetectionStats/s/^/\# OBSOLETE: /' /etc/freshclam.conf ||:
%preun
%service_del_preun clamd.service freshclam.service clamav-milter.service