From 29c894db157e9b2bb2a392e0abb83ac700a839d5 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 1 Nov 2022 14:13:08 +0100 Subject: sync --- .scripts/vpn | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to '.scripts/vpn') diff --git a/.scripts/vpn b/.scripts/vpn index 62aab79..46ac1fb 100755 --- a/.scripts/vpn +++ b/.scripts/vpn @@ -8,25 +8,29 @@ if [ "$EUID" -eq 0 ]; then fi if ! wg &>/dev/null; then - wg-quick down wg0 + wg-quick down wg0 || wg-quick down wg1 echo "Disconnected from Wireguard!" exit fi if sudo pppstats &>/dev/null; then - sudo poff uni-tuebingen - echo "Disconnected from Tübingen!" + sudo poff uni + echo "Disconnected from Universität Tübingen!" exit fi -read -p "[T]uebingen or [W]ireguard? " -n 1 -r +read -p "[U]ni, [T]übingen or [L]angenau? " -n 1 -r echo -if [[ $REPLY =~ ^[Tt]$ ]]; then - sudo pon uni-tuebingen - echo "Connected to Tübingen!" +if [[ $REPLY =~ ^[Uu]$ ]]; then + sudo pon uni + echo "Connected to Universität Tübingen!" exit -elif [[ $REPLY =~ ^[Ww]$ ]]; then +elif [[ $REPLY =~ ^[Ll]$ ]]; then wg-quick up wg0 - echo "Connected to Wireguard!" + echo "Connected to Langenau Eaglefit!" + exit +elif [[ $REPLY =~ ^[Tt]$ ]]; then + wg-quick up wg1 + echo "Connected to Tübingen home!" exit fi -- cgit v1.2.3