From 019664afc163e16d2003faad312e47ca15880b58 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 8 Nov 2024 14:29:36 +0100 Subject: [PATCH 1/2] borgbackup: make logs a bit cleaner if local archive is used Signed-off-by: Simon L. --- Containers/borgbackup/backupscript.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index f86edb01..3c53e5cc 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -66,7 +66,9 @@ if [ -n "$BORG_REMOTE_REPO" ] && ! [ -f "$BORGBACKUP_KEY" ]; then ssh-keygen -f "$BORGBACKUP_KEY" -N "" echo "You should configure the remote to accept this public key" fi -echo "Your public ssh key for borgbackup is: $(cat "$BORGBACKUP_KEY.pub")" +if [ -n "$BORG_REMOTE_REPO" ] + echo "Your public ssh key for borgbackup is: $(cat "$BORGBACKUP_KEY.pub")" +fi # Do the backup if [ "$BORG_MODE" = backup ]; then From ccf445a5d1db93047b2af1b0949fc74158ae6893 Mon Sep 17 00:00:00 2001 From: "Simon L." Date: Fri, 8 Nov 2024 14:50:35 +0100 Subject: [PATCH 2/2] fix the commit Signed-off-by: Simon L. --- Containers/borgbackup/backupscript.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index 3c53e5cc..d5fe6e2a 100644 --- a/Containers/borgbackup/backupscript.sh +++ b/Containers/borgbackup/backupscript.sh @@ -66,7 +66,7 @@ if [ -n "$BORG_REMOTE_REPO" ] && ! [ -f "$BORGBACKUP_KEY" ]; then ssh-keygen -f "$BORGBACKUP_KEY" -N "" echo "You should configure the remote to accept this public key" fi -if [ -n "$BORG_REMOTE_REPO" ] +if [ -n "$BORG_REMOTE_REPO" ] && [ -f "$BORGBACKUP_KEY.pub" ]; then echo "Your public ssh key for borgbackup is: $(cat "$BORGBACKUP_KEY.pub")" fi