Add debug for SSH connect on init

Closes coop-cloud/abra#109.
This commit is contained in:
decentral1se 2021-03-18 18:55:04 +01:00
parent 390e918417
commit 005323ff3c
Signed by untrusted user who does not match committer: decentral1se
GPG Key ID: 92DAD76BD9567B8A

5
abra
View File

@ -1608,6 +1608,11 @@ sub_server_init() {
# when there are often multiple internal addresses assigned to eth0 # when there are often multiple internal addresses assigned to eth0
default_ipv4="$(ip route get 8.8.8.8 | head -1 | awk '{print $7}')" 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 swarm init --advertise-addr "$default_ipv4" || true
docker network create --driver=overlay proxy --scope swarm || true docker network create --driver=overlay proxy --scope swarm || true
} }