summaryrefslogtreecommitdiff
path: root/system/glances/doinst.sh
diff options
context:
space:
mode:
Diffstat (limited to 'system/glances/doinst.sh')
-rw-r--r--system/glances/doinst.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/system/glances/doinst.sh b/system/glances/doinst.sh
new file mode 100644
index 0000000000..589723e01a
--- /dev/null
+++ b/system/glances/doinst.sh
@@ -0,0 +1,11 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ rm $NEW
+ fi
+}
+
+config /etc/glances.conf.new