borg-init: remove unnecessary delete logic

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2025-11-06 11:40:14 +01:00
parent 849f052a41
commit a7b9c95c6c

View file

@ -138,11 +138,6 @@ if [ "$BORG_MODE" = backup ]; then
NEW_REPOSITORY=1
if ! borg init --debug --encryption=repokey-blake2; then
echo "Could not initialize borg repository."
if [ -z "$BORG_REMOTE_REPO" ]; then
# Originally we checked for presence of the config file instead of calling `borg info`. Likely `borg info`
# will error on a partially initialized repo, so this line is probably no longer necessary
rm -f "$BORG_BACKUP_DIRECTORY/config"
fi
exit 1
fi