mirror of https://github.com/tiyn/dotfiles
parent
c93aa71479
commit
1f7b8cf4d8
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
active=$(nmcli connection show --active | grep vpn | cut -d' ' -f1)
|
||||||
|
[[ ! -z "$active" ]] && { prompt "disconnect from $active?" || exit 1; }
|
||||||
|
[[ ! -z "$active" ]] && nmcli connection down $active
|
||||||
|
conn=$(nmcli connection | grep vpn | cut -d' ' -f1 | dmenu)
|
||||||
|
nmcli connection up $conn
|
Loading…
Reference in new issue