wireguard_depend()
{
program wg
after interface
before interface
}
wireguard_pre_start()
wireguard_pre_up()
[ "${IFACE#wg}" != "$IFACE" ] || return 0
eval wg set "$IFACE" "$@"
fi
e=$?
if [ $e -eq 0 ]; then
[ $e -eq 0 ] || ip link delete dev "$IFACE" type wireguard 2>/dev/null
_up
eend $e
return $e
ip link delete dev "$IFACE" type wireguard 2>/dev/null