summaryrefslogtreecommitdiffstats
path: root/network/cacti-spine/doinst.sh
diff options
context:
space:
mode:
author Thibaut Notteboom2013-01-13 21:53:07 +0100
committer dsomero2013-01-20 15:03:05 +0100
commit7efc0bc77a5515804b66bf8b74655f5f441ccd50 (patch)
tree8e10ed09a7823251b8a9d57fa77b207c150682cd /network/cacti-spine/doinst.sh
parent79a9b6ba53684f2ce0bc375c3475a9d104bcf665 (diff)
downloadslackbuilds-7efc0bc77a5515804b66bf8b74655f5f441ccd50.tar.gz
network/cacti-spine: Added (poller for Cacti).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'network/cacti-spine/doinst.sh')
-rw-r--r--network/cacti-spine/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/network/cacti-spine/doinst.sh b/network/cacti-spine/doinst.sh
new file mode 100644
index 0000000000..456df76a69
--- /dev/null
+++ b/network/cacti-spine/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/spine.conf.new