summaryrefslogtreecommitdiff
path: root/network/squidGuard/doinst.sh
diff options
context:
space:
mode:
authorNiki Kovacs <info@microlinux.fr>2015-02-05 05:14:18 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2015-02-05 06:47:43 +0700
commitce1f25ac6d79adecc55fa3a9474d8bb15d3b2af3 (patch)
tree5ad100bda349016cba45180e54ea090fdac33a56 /network/squidGuard/doinst.sh
parentb73456910b7c7b26504cb8ea777ec4a08bc8ffce (diff)
downloadslackbuilds-ce1f25ac6d79adecc55fa3a9474d8bb15d3b2af3.tar.gz
network/squidGuard: Added (URL redirector).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/squidGuard/doinst.sh')
-rw-r--r--network/squidGuard/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/network/squidGuard/doinst.sh b/network/squidGuard/doinst.sh
new file mode 100644
index 0000000000..0938b3cf5f
--- /dev/null
+++ b/network/squidGuard/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/squidguard/squidguard.conf.new