From 5a86af0c8ec6152ab718a47979d34e8ec87be287 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Mon, 7 Aug 2023 14:06:28 +0200 Subject: [PATCH] vpn: update ep --- vpn.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/vpn.sh b/vpn.sh index a0dab78..95674cc 100755 --- a/vpn.sh +++ b/vpn.sh @@ -4,13 +4,20 @@ set -e case "$1" in - lf) + tws) # Ensure we are on the right branch and pass has been unlocked pass git checkout nico-privat - pass lionfish/nschottelius1 > /dev/null + pass tws/nschottelius1 > /dev/null + + authgroup=Europe # Try to input the password directly, revert to non input if it fails - pass lionfish/nschottelius1 | sudo openconnect --protocol=gp portal.techcorpapps.com --allow-insecure-crypto --user nschottelius1 --passwd-on-stdin --authgroup=Spain || sudo openconnect --protocol=gp portal.techcorpapps.com --allow-insecure-crypto --user nschottelius1 --passwd-on-stdin --authgroup=Spain + pass tws/nschottelius1 | sudo openconnect --protocol=gp portal.techcorpapps.com \ + --allow-insecure-crypto --user nschottelius1 \ + --passwd-on-stdin --authgroup=$authgroup || \ + sudo openconnect --protocol=gp portal.techcorpapps.com \ + --allow-insecure-crypto --user nschottelius1 \ + --passwd-on-stdin --authgroup=$authgroup ;; lx) cd ~/Nextcloud/luxembourg/nico/