X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=clamav-cn.git;a=blobdiff_plain;f=debian%2Fpostinst;h=bff2dbb451aabe22d4b3f087772029d839580bfd;hp=d40791d0b6d20bbba1242dff72dc4b57c33c878e;hb=f1c24e07b91f6827b6386b3ab53fab882c5f0d0e;hpb=5369fa1796979773d4e33c04578ece90eb52b625 diff --git a/debian/postinst b/debian/postinst index d40791d..bff2dbb 100755 --- a/debian/postinst +++ b/debian/postinst @@ -6,21 +6,12 @@ set -e [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx # Load CARNet functions -#. /usr/share/carnet-tools/functions.sh - -#if dpkg --compare-versions "$2" lt 2:0.91.1-1 ; then -# cp_backup_conffile /etc/clamav/clamd.conf -# rm -f /etc/clamav/clamd.conf -# cp -a /usr/share/doc/clamav-cn/examples/clamd.conf /etc/clamav/clamd.conf -# restart="yes" -#fi -# -#if dpkg --compare-versions "$2" lt 2:0.91.1-1 ; then -# cp_backup_conffile /etc/clamav/freshclam.conf -# rm -f /etc/clamav/freshclam.conf -# cp -a /usr/share/doc/clamav-cn/examples/freshclam.conf /etc/clamav/freshclam.conf -# restart="yes" -#fi +. /usr/share/carnet-tools/functions.sh + +# obsolete option +cp_check_and_sed "^AllowSupplementaryGroups" \ + "s/^AllowSupplementaryGroups/#AllowSupplementaryGroups/g" \ + /etc/clamav/clamd.conf && restart="yes" || true chown -R clamav:clamav /var/run/clamav /var/lib/clamav /var/log/clamav @@ -29,14 +20,7 @@ getent group amavis > /dev/null && usermod -G amavis clamav && restart="yes" # restart if needed [ "$restart" = "yes" ] || exit 0 -if [ -x /usr/sbin/invoke-rc.d ]; then - [ -x /etc/init.d/clamav-daemon ] && invoke-rc.d clamav-daemon restart -else - [ -x /etc/init.d/clamav-daemon ] && /etc/init.d/clamav-daemon restart -fi - -if [ -x /usr/sbin/invoke-rc.d ]; then - [ -x /etc/init.d/clamav-freshclam ] && invoke-rc.d clamav-freshclam restart -else - [ -x /etc/init.d/clamav-freshclam ] && /etc/init.d/clamav-freshclam restart -fi +service clamav-daemon restart +service clamav-freshclam restart + +#DEBHELPER#