void-bash-installer/files/nm/30-wg0

22 lines
249 B
Bash
Executable File

#!/bin/sh
INTERFACE=$1
ACTION=$2
if [ -f /etc/wireguard/wg0.conf ]; then
case "$INTERFACE" in
tun*|wg*)
exit 0
;;
*)
case "$ACTION" in
up)
wg-quick up wg0
;;
down)
wg-quick down wg0
;;
esac
;;
esac
fi