X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=src%2Fpaks%2Fsquidclamav%2Fupdate.sh;h=95516021498f344f18c4a9abe187d50a7f238672;hp=3387a89ed106b3141a72e9a9e3f70de4a1235000;hb=f18be3b0bf3bfcd01510813fff6c055a219df4c7;hpb=2a0a67412b0ac4cea8a5fa2ef52be0f260b3c6b8 diff --git a/src/paks/squidclamav/update.sh b/src/paks/squidclamav/update.sh index 3387a89ed1..9551602149 100644 --- a/src/paks/squidclamav/update.sh +++ b/src/paks/squidclamav/update.sh @@ -24,6 +24,15 @@ . /opt/pakfire/lib/functions.sh ./uninstall.sh extract_files -# Restoring the backup has to be excluded because config file changed -# restore_backup ${NAME} + +VERSION=$(cat /opt/pakfire/db/installed/meta-squidclamav | grep Release | cut -d" " -f2) + +if [ "$VERSION" -gt "10" ]; then + restore_backup ${NAME} +fi + +if [ "$VERSION" -lt "11" ]; then + sed -e "s|logfile.*|logfile /var/log/squid/squidclamav.log|g" /etc/squidclamav.conf +fi + /etc/init.d/squid restart