summaryrefslogtreecommitdiffstats
path: root/system/glances/doinst.sh
diff options
context:
space:
mode:
author Philip Lacroix <philnx[at]bluebottle[dot]com>2013-11-30 16:27:55 +0100
committer Robby Workman <rworkman@slackbuilds.org>2013-12-02 00:58:00 -0600
commit7a3cfd7ff4bd29955f07de756e2155e72cd7e8df (patch)
tree7d87ce4bd81afc43f4cfb4903179d31f4791f3e3 /system/glances/doinst.sh
parent3bbf957da1a7c955d89a9ce672e2444e5db38268 (diff)
downloadslackbuilds-7a3cfd7ff4bd29955f07de756e2155e72cd7e8df.tar.gz
slackbuilds-7a3cfd7ff4bd29955f07de756e2155e72cd7e8df.tar.xz
system/glances: Added (curses-based monitoring tool).
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'system/glances/doinst.sh')
-rw-r--r--system/glances/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/glances/doinst.sh b/system/glances/doinst.sh
new file mode 100644
index 0000000000..3ec38c6c20
--- /dev/null
+++ b/system/glances/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/glances/glances.conf.new