diff options
author | Jeremy HOCDE <jeremyhocde@gmail.com> | 2017-07-21 23:05:33 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2017-07-22 06:57:34 +0700 |
commit | a200cf1452dca7d0ab5ab6ccf09d61339d6bd625 (patch) | |
tree | 3b5c81c1932eac58f96007f3baf715e93168cefa /system/squidclamav/doinst.sh | |
parent | ea930a9237d403035e1f8a534dce9482390d2063 (diff) | |
download | slackbuilds-a200cf1452dca7d0ab5ab6ccf09d61339d6bd625.tar.gz |
system/squidclamav: Added (Clamav ICAP service for Squid).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/squidclamav/doinst.sh')
-rw-r--r-- | system/squidclamav/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/system/squidclamav/doinst.sh b/system/squidclamav/doinst.sh new file mode 100644 index 0000000000..b8161e4c14 --- /dev/null +++ b/system/squidclamav/doinst.sh @@ -0,0 +1,14 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/squidclamav.conf.new |