summaryrefslogtreecommitdiffstats
path: root/system/monitorix/doinst.sh
diff options
context:
space:
mode:
author Marcel Saegebarth2014-06-20 21:10:19 +0200
committer Willy Sudiarto Raharjo2014-06-20 21:10:19 +0200
commitd2af1b484f5c82a5ebdbec51e71dd222dcd2e219 (patch)
treef3f408ab9879a4f120feed2b630a960b7da51921 /system/monitorix/doinst.sh
parentff3ae970c40d49e17504d2c5c161de5d9c050e7a (diff)
downloadslackbuilds-d2af1b484f5c82a5ebdbec51e71dd222dcd2e219.tar.gz
system/monitorix: Added (Lightweight system monitoring tool).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/monitorix/doinst.sh')
-rw-r--r--system/monitorix/doinst.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/system/monitorix/doinst.sh b/system/monitorix/doinst.sh
new file mode 100644
index 0000000000..40235800ce
--- /dev/null
+++ b/system/monitorix/doinst.sh
@@ -0,0 +1,19 @@
+#!/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/monitorix/monitorix.conf.new
+config etc/rc.d/rc.monitorix.new
+config etc/logrotate.d/monitorix.new
+config etc/httpd/extra/httpd-monitorix.conf.new