File: wireguard

package info (click to toggle)
ifupdown-ng 0.12.1-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 964 kB
  • sloc: ansic: 3,572; sh: 980; makefile: 233
file content (15 lines) | stat: -rwxr-xr-x 321 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
[ -n "$VERBOSE" ] && set -x
[ -z "$IF_WIREGUARD_CONFIG_PATH" ] && IF_WIREGUARD_CONFIG_PATH="/etc/wireguard/$IFACE.conf"

case "$PHASE" in
create)
	${MOCK} ip link add $IFACE type wireguard
	;;
pre-up)
	${MOCK} wg setconf $IFACE $IF_WIREGUARD_CONFIG_PATH
	;;
destroy)
	${MOCK} ip link delete dev $IFACE
	;;
esac