exit if ssh breaks

This commit is contained in:
Nico Schottelius 2020-09-08 17:19:51 +02:00
parent caabcc2f47
commit ddbc95f6f0

View file

@ -36,7 +36,7 @@ public_key=$(echo $private_key | wg pubkey)
vpn_endpoint_host=vpn-2a0ae5c1.ungleich.ch vpn_endpoint_host=vpn-2a0ae5c1.ungleich.ch
vpn_endpoint_pubkey=hi60lGP+xEUQ+kVnqA7PlJAO1SVqTS1W36g0LhFP0xQ= vpn_endpoint_pubkey=hi60lGP+xEUQ+kVnqA7PlJAO1SVqTS1W36g0LhFP0xQ=
cat <<EOF | ssh -t "root@${my_ip}" cat <<EOF | ssh -t "root@${my_ip}" || exit 1
set -x set -x
# Check if we can reach upstream - otherwise abort # Check if we can reach upstream - otherwise abort