#!/usr/bin/env sh ### # Switch wireguard vpns up/down ### STATUS="$(nmcli device status | grep -c wg0)" case $STATUS in 1) wg-quick down wg0 notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-offline-symbolic Wireguard "Connection down" & ;; *) wg-quick up wg0 notify-send.py -a wireguard --replaces-process wireguard-status -i network-vpn-symbolic Wireguard "Connection up" & ;; esac