aboutsummaryrefslogtreecommitdiff
path: root/system/uptimed/doinst.sh
diff options
context:
space:
mode:
authorGraham Orange <gorange40@gmail.com>2014-04-11 01:18:22 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-04-11 01:24:12 +0700
commitd4e8c61fafba3b438ef7a19403305b09e8d0f6eb (patch)
tree04c7c49e501c82640c636a391c756b3f82ae6fa8 /system/uptimed/doinst.sh
parent96c3b4238ea54b45be6f47b3628372f929235854 (diff)
system/uptimed: Added (An uptime daemon).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/uptimed/doinst.sh')
-rw-r--r--system/uptimed/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/system/uptimed/doinst.sh b/system/uptimed/doinst.sh
new file mode 100644
index 0000000000000..d52cd5c29c0a2
--- /dev/null
+++ b/system/uptimed/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/uptimed.conf-dist.new