From 7a3cfd7ff4bd29955f07de756e2155e72cd7e8df Mon Sep 17 00:00:00 2001 From: Philip Lacroix Date: Sat, 30 Nov 2013 16:27:55 +0100 Subject: system/glances: Added (curses-based monitoring tool). Signed-off-by: Matteo Bernardini --- system/glances/doinst.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 system/glances/doinst.sh (limited to 'system/glances/doinst.sh') 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 -- cgit v1.2.3