From c26b971d080371f47752bd706c9cfc317b34affd Mon Sep 17 00:00:00 2001 From: "Oleg A. Deordiev" Date: Fri, 18 Apr 2014 09:29:18 +0700 Subject: network/rejik: Added (squid redirector). Signed-off-by: Willy Sudiarto Raharjo --- network/rejik/doinst.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 network/rejik/doinst.sh (limited to 'network/rejik/doinst.sh') diff --git a/network/rejik/doinst.sh b/network/rejik/doinst.sh new file mode 100644 index 0000000000..d14634e173 --- /dev/null +++ b/network/rejik/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/squid/redirector.conf.dist.new -- cgit v1.2.3