1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Added script to switch wireguard interfaces up/down

This commit is contained in:
Ryan Kes 2019-05-18 23:08:32 +02:00
parent 311f8cc5ee
commit a4c3d9c57e

View File

@ -0,0 +1,18 @@
#!/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
;;
*)
sudo wg-quick up wg0
sudo wg-quick up wg1
;;
esac