Add debug for SSH connect on init

Closes #109.
This commit is contained in:
decentral1se 2021-03-18 18:55:04 +01:00
parent 390e918417
commit 005323ff3c
Signed by: decentral1se
GPG Key ID: 92DAD76BD9567B8A
1 changed files with 5 additions and 0 deletions

5
abra
View File

@ -1608,6 +1608,11 @@ sub_server_init() {
# when there are often multiple internal addresses assigned to eth0
default_ipv4="$(ip route get 8.8.8.8 | head -1 | awk '{print $7}')"
if [ "$abra___debug" = "true" ]; then
DOCKER_ENDPOINT=$(docker context inspect "$DOCKER_CONTEXT" -f "{{.Endpoints.docker.Host}}" 2>/dev/null)
debug "Connecting to $DOCKER_CONTEXT via SSH ($DOCKER_ENDPOINT)"
fi
docker swarm init --advertise-addr "$default_ipv4" || true
docker network create --driver=overlay proxy --scope swarm || true
}