From 8bc1940eb1c9091d1600617f7c77a63269640f67 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Sat, 12 Sep 2026 21:23:36 +0200 Subject: zot: Added --- zot/doinst.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 zot/doinst.sh (limited to 'zot/doinst.sh') 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 -- cgit v1.2.3