ssh client extract from borg repo env
All checks were successful
/ build-docker-image (push) Successful in 36s

This commit is contained in:
2025-09-14 03:21:21 +01:00
parent 1afda6697d
commit 6593c5f04f
2 changed files with 3 additions and 7 deletions

View File

@@ -13,7 +13,7 @@ services:
configs:
- source: id_ed25519
target: /home/borg/.ssh/id_ed25519
target: /root/.ssh/id_ed25519
- source: borg_key
target: /app/borg/key

View File

@@ -6,18 +6,14 @@
exit 1
}
if [ -f "/app/borg/key" ]; then
export BORG_KEY_FILE="/app/borg/key"
fi
export SSH_CONNECTION=$(echo "$BORG_REPO" | sed -E 's#ssh://([^:]+):.*#\1#')
export SSH_FOLDER=$(echo "$BORG_REPO" | sed -E 's#ssh://[^:]+:(.*)#\1#')
# extracts ssh connection from borg-repo
export SSH_CONNECTION="${BORG_REPO#ssh://}"
export SSH_CONNECTION="${SSH_CONNECTION%%/*}"
#extract folder from ssh connection
export SSH_FOLDER="/${BORG_REPO#ssh://*/}"
export SSH_COMMAND="ssh"