ssh client extract from borg repo env
All checks were successful
/ build-docker-image (push) Successful in 36s
All checks were successful
/ build-docker-image (push) Successful in 36s
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user