forked from finn/tinyboard
fix tunnel reachability check to be safe with set -e
This commit is contained in:
@@ -34,9 +34,11 @@ info "Scanning spoke host key..."
|
||||
ssh-keyscan -p "$TUNNEL_PORT" -H localhost >> "$SSH_DIR/known_hosts" 2>/dev/null
|
||||
|
||||
info "Verifying spoke is reachable on port $TUNNEL_PORT..."
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=10 -p "$TUNNEL_PORT" armbian@localhost exit 2>/dev/null \
|
||||
&& info "Spoke is reachable." \
|
||||
|| warn "Could not verify spoke without a key yet — proceeding to key setup."
|
||||
if ssh -o BatchMode=yes -o ConnectTimeout=10 -p "$TUNNEL_PORT" armbian@localhost exit 2>/dev/null; then
|
||||
info "Spoke is reachable."
|
||||
else
|
||||
warn "Could not verify spoke without a key yet — proceeding to key setup."
|
||||
fi
|
||||
|
||||
header "Generating Hub SSH Key"
|
||||
if [ -f "$KEY_PATH" ]; then
|
||||
|
||||
Reference in New Issue
Block a user