fix(openconnect): ugent sso
This commit is contained in:
parent
6224eafa70
commit
b92a2fb821
7 changed files with 41 additions and 17 deletions
15
nixos/modules/networking/openconnect/ugent-vpn.sh
Normal file
15
nixos/modules/networking/openconnect/ugent-vpn.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
echo 'Starting UGent SSO authentication...'
|
||||
eval "$( openconnect --authenticate --protocol=anyconnect vpn.ugent.be )"
|
||||
|
||||
if [ -z "${COOKIE}" ]; then
|
||||
echo 'Authentication failed or was aborted.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 'Authentication successful. Establishing tunnel...'
|
||||
sudo openconnect --protocol=anyconnect --cookie="${COOKIE}" "${CONNECT_URL}" --servercert="${FINGERPRINT}" --resolve="${RESOLVE}"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue