From 7b081dd5039d8d2a5f7fd67f5e4b44c3a45207c6 Mon Sep 17 00:00:00 2001 From: Jamil Date: Fri, 3 Mar 2023 08:40:04 -0800 Subject: [PATCH] Don't create interface if it already exists (#1487) This is now needed because `set -e` was added to the calling script. Before, we simply allowed the command to fail silently. Fixes #1485 --- rel/overlays/bin/bootstrap | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rel/overlays/bin/bootstrap b/rel/overlays/bin/bootstrap index 40980774a..941a13f1d 100755 --- a/rel/overlays/bin/bootstrap +++ b/rel/overlays/bin/bootstrap @@ -11,6 +11,10 @@ setup_interface() { + if [ ! -d "/sys/class/net/${WIREGUARD_INTERFACE_NAME}" ]; then + ip link add ${WIREGUARD_INTERFACE_NAME} type wireguard + fi + ip link add ${WIREGUARD_INTERFACE_NAME} type wireguard if [ "$WIREGUARD_IPV4_ENABLED" = "true" ]; then