Created
February 22, 2017 03:48
-
-
Save stvhwrd/da1f992d9d6f96aa0a21c56a8ab9f943 to your computer and use it in GitHub Desktop.
Connect to / disconnect from VPN server via Tunnelblick on the macOS command line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Connect to VPN configuration, usage: vpn_connect "US Seattle"; | |
vpn_connect() { | |
osascript -e "tell application \"Tunnelblick\"" -e "connect \"$1\"" -e "end tell" | |
} | |
# Disconnect from all Tunnelblick connections, usage: vpn_disconnect; | |
vpn_disconnect() { | |
osascript -e "tell application \"Tunnelblick\"" -e "disconnect all" -e "end tell" ⏎ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment