From a52ce5006ae543a761e37a75773c41e116796b07 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Mon, 3 Oct 2022 12:44:54 +0200
Subject: [PATCH] add restic unlock on init

---
 plugins/transfer/restic.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/plugins/transfer/restic.sh b/plugins/transfer/restic.sh
index 663848b..9925c42 100644
--- a/plugins/transfer/restic.sh
+++ b/plugins/transfer/restic.sh
@@ -130,6 +130,13 @@
         if eval restic snapshots ${ARGS_DEFAULT} >/dev/null 2>&1
         then
             echo "__REPO__ OK, Backup repository already exists."
+
+            echo "--- UNLOCK ... just in case :-)" 
+            echo restic unlock ${ARGS_DEFAULT}
+            color cmd
+            eval restic unlock ${ARGS_DEFAULT}
+            color reset
+            echo
         else
             echo "Backup repository needs to be created."
             local _mycmd="restic init ${ARGS_DEFAULT}"
-- 
GitLab