diff --git a/Containers/borgbackup/backupscript.sh b/Containers/borgbackup/backupscript.sh index f86edb01..d5fe6e2a 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" ] && [ -f "$BORGBACKUP_KEY.pub" ]; then + echo "Your public ssh key for borgbackup is: $(cat "$BORGBACKUP_KEY.pub")" +fi # Do the backup if [ "$BORG_MODE" = backup ]; then