viviwb2 -> all in one step
This commit is contained in:
parent
7e895c30b8
commit
8f161e2137
1 changed files with 8 additions and 19 deletions
|
@ -108,25 +108,6 @@ uci delete wireless.radio0.disabled
|
|||
|
||||
uci commit
|
||||
|
||||
# Need to reboot to restore /etc/resolv.conf
|
||||
reboot
|
||||
|
||||
EOF
|
||||
|
||||
# ensure viwib is back
|
||||
# ensure viwib network is up and running - bridge takes a bit of time
|
||||
# ensure viwib gives out ipv6 address
|
||||
# Found: 30s is not enough for full reconfiguration
|
||||
echo "Public VPN key: ${id} ${public_key}"
|
||||
|
||||
sleep 60
|
||||
|
||||
# change to ipv6
|
||||
viwib_ip=${my_lan_ip}
|
||||
|
||||
ping -c5 ${viwib_ip}
|
||||
|
||||
cat <<EOF | ssh -t "root@${viwib_ip}"
|
||||
ping -c5 ungleich.ch || exit 1
|
||||
|
||||
# update the sources
|
||||
|
@ -197,3 +178,11 @@ EOF
|
|||
|
||||
echo "Wireguard public key and id: ${id} ${public_key}"
|
||||
echo ${public_key} > ${viwib_hostname}.public_key
|
||||
|
||||
# change to ipv6
|
||||
viwib_ip=${my_lan_ip}
|
||||
|
||||
while ! ping -c5 ${viwib_ip}; do
|
||||
echo "Waiting for viwib ${id}"
|
||||
sleep 2
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue