aboutsummaryrefslogtreecommitdiff
path: root/zot/doinst.sh
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-09-12 21:23:36 +0200
committerEugen Wissner <belka@caraus.de>2026-09-12 21:23:36 +0200
commit8bc1940eb1c9091d1600617f7c77a63269640f67 (patch)
tree4ef33d9c5267ed4568500ffa003843d2bd13e883 /zot/doinst.sh
parent0db420a455a0ff14d737609128803912f7cb9c04 (diff)
downloadslackbuilds-8bc1940eb1c9091d1600617f7c77a63269640f67.tar.gz
zot: Added
Diffstat (limited to 'zot/doinst.sh')
-rw-r--r--zot/doinst.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/zot/doinst.sh b/zot/doinst.sh
new file mode 100644
index 0000000..dfef45f
--- /dev/null
+++ b/zot/doinst.sh
@@ -0,0 +1,17 @@
+###############
+# Config file #
+###############
+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/zot/config.yaml.new