Skip to content

Instantly share code, notes, and snippets.

@ibejohn818
Last active August 20, 2020 17:53
Show Gist options
  • Save ibejohn818/4715c1fcf33f0e64f7f5f83daf476e64 to your computer and use it in GitHub Desktop.
Save ibejohn818/4715c1fcf33f0e64f7f5f83daf476e64 to your computer and use it in GitHub Desktop.
Tunnelblick connect via CLI
#!/usr/bin/env bash
read -r -d '' USAGE <<'USAGEEND'
tblick - Launch tunnelblick and connect to VPN
Examples:
Launch tunnelblick and connect to VPN
$ tblick [TUNNELBLICK-VPN-NAME]
Options:
-h This help text.
USAGEEND
while getopts h: flag; do
case $flag in
h|\?)
echo "$USAGE"; exit;;
esac
done
osascript -e "tell application \"/Applications/Tunnelblick.app\"" -e "connect \"${1}\"" -e "end tell"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment