Skip to content

Instantly share code, notes, and snippets.

@steadystatic
Last active August 16, 2018 17:29
Show Gist options
  • Save steadystatic/bfe79ad31adb013b83565ceba328eaad to your computer and use it in GitHub Desktop.
Save steadystatic/bfe79ad31adb013b83565ceba328eaad to your computer and use it in GitHub Desktop.
OpenConnect script see https://gist.github.com/steadystatic/3059d7ee12f2ccf7eab2e8327dc2dda3 and use bash variables
#!/bin/sh
# Kill other sessions
killall openconnect
sleep 2
# Need these variables in current shell profile:
openconnect --pid-file=$VPN_PID -b --servercert $VPN_CERT --authgroup=$VPN_AUTH -u $VPN_USER --script /etc/vpnc/vpnc-script $VPN_IP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment