1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00
dotfiles/wireguard/.scripts/vpn-switch.sh
2019-05-29 19:53:57 +02:00

21 lines
314 B
Bash
Executable File

#!/bin/sh
###
# Switch wireguard vpns up/down
###
STATUS="$(nmcli device status | grep -c wg0)"
case $STATUS in
1)
sudo wg-quick down wg0
sudo wg-quick down wg1
notify-send "down"
;;
*)
sudo wg-quick up wg0
sudo wg-quick up wg1
notify-send "up"
;;
esac