Created
August 1, 2020 15:56
-
-
Save wparad/3a1bed0e0455f0eab495d8e602bf8c39 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Assuming the VPN connection name is SeedBox | |
| currentState=`nmcli connection | grep SeedBox | tr -s ' ' | cut -f4 -d' '` | |
| if [ "${currentState}" = "--" ] | |
| then | |
| nmcli connection up SeedBox | |
| else | |
| nmcli connection down SeedBox | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment