15 lines
424 B
Bash
15 lines
424 B
Bash
#!/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}"
|
|
|