From bd7fbd6f34797a1dc20a585d5e6b91bef9821061 Mon Sep 17 00:00:00 2001 From: David Woodfall Date: Wed, 16 Sep 2015 07:14:47 +0700 Subject: system/goaccess: Updated for version 0.9.4. Signed-off-by: Willy Sudiarto Raharjo --- system/goaccess/doinst.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 system/goaccess/doinst.sh (limited to 'system/goaccess/doinst.sh') diff --git a/system/goaccess/doinst.sh b/system/goaccess/doinst.sh new file mode 100644 index 0000000000..07fd2e932b --- /dev/null +++ b/system/goaccess/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/goaccess.conf.new -- cgit v1.2.3