Skip to content

Commit 267aebf

Browse files
authored
Merge pull request nextcloud#5553 from nextcloud/enh/4804/clean-borg
borgbackup: make logs a bit cleaner if local archive is used
2 parents ada09ed + ccf445a commit 267aebf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Containers/borgbackup/backupscript.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ if [ -n "$BORG_REMOTE_REPO" ] && ! [ -f "$BORGBACKUP_KEY" ]; then
6666
ssh-keygen -f "$BORGBACKUP_KEY" -N ""
6767
echo "You should configure the remote to accept this public key"
6868
fi
69-
echo "Your public ssh key for borgbackup is: $(cat "$BORGBACKUP_KEY.pub")"
69+
if [ -n "$BORG_REMOTE_REPO" ] && [ -f "$BORGBACKUP_KEY.pub" ]; then
70+
echo "Your public ssh key for borgbackup is: $(cat "$BORGBACKUP_KEY.pub")"
71+
fi
7072

7173
# Do the backup
7274
if [ "$BORG_MODE" = backup ]; then

0 commit comments

Comments
 (0)