vpn: update ep

This commit is contained in:
Nico Schottelius 2023-08-07 14:06:28 +02:00
parent 6892c37d35
commit 5a86af0c8e
1 changed files with 10 additions and 3 deletions

13
vpn.sh
View File

@ -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/