This commit is contained in:
1 parent
1afda6697d
commit
6593c5f04f
2 files changed
+3
-7
No files matched your search
@@ -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