summaryrefslogtreecommitdiff
path: root/network/vnstat/doinst.sh
diff options
context:
space:
mode:
authorMichiel van Wessem <michiel@slackbuilds.org>2010-05-11 19:46:05 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 19:46:05 +0200
commit521e6c6ce4dfd2eea8da0394053c42688d668d5c (patch)
tree53150ec430e9855802725925ffadc39f557746fa /network/vnstat/doinst.sh
parente846e1bf5fcca3f169b0e5605dfce98823d3a7b0 (diff)
downloadslackbuilds-521e6c6ce4dfd2eea8da0394053c42688d668d5c.tar.gz
network/vnstat: Updated for version 1.6
Diffstat (limited to 'network/vnstat/doinst.sh')
-rw-r--r--network/vnstat/doinst.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/network/vnstat/doinst.sh b/network/vnstat/doinst.sh
new file mode 100644
index 0000000000..206b717881
--- /dev/null
+++ b/network/vnstat/doinst.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+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/vnstat.conf.new
+