aboutsummaryrefslogtreecommitdiff
path: root/.scripts/vpn
diff options
context:
space:
mode:
authorMarvin Borner2022-11-01 14:13:08 +0100
committerMarvin Borner2022-11-01 14:13:08 +0100
commit29c894db157e9b2bb2a392e0abb83ac700a839d5 (patch)
tree1e630bfabf1d94b61a88ab7b6e8b631113b6f7fd /.scripts/vpn
parent600de714ba13c1ccd54357554898db909de5af81 (diff)
sync
Diffstat (limited to '.scripts/vpn')
-rwxr-xr-x.scripts/vpn22
1 files changed, 13 insertions, 9 deletions
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