Update executors to reflect new create/destroy phase.

Signed-off-by: Maximilian Wilhelm <max@sdn.clinic>
This commit is contained in:
Maximilian Wilhelm 2020-09-10 00:48:35 +02:00
parent e6c6f49143
commit af94d760d0
7 changed files with 37 additions and 18 deletions

View file

@ -6,11 +6,13 @@ set -e
[ -z "$IF_WIREGUARD_CONFIG_PATH" ] && IF_WIREGUARD_CONFIG_PATH="/etc/wireguard/$IFACE.conf"
case "$PHASE" in
pre-up)
create)
${MOCK} ip link add $IFACE type wireguard
;;
pre-up)
${MOCK} wg setconf $IFACE $IF_WIREGUARD_CONFIG_PATH
;;
post-down)
destroy)
${MOCK} ip link delete dev $IFACE
;;
esac