void-bash-installer/files/nm/30-wg0
2021-05-07 18:52:50 +02:00

24 lines
379 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
#wg set wg0 peer ZJwTV2l+N+vFwL0KFQb5xpAPqwVcf0YvEMFzTaIoAU8= endpoint home.rotce.de:51820
;;
down)
wg-quick down wg0
#ip link delete dev wg0
;;
esac
;;
esac
fi