Hotfix: remove duplicate ip link command (#1498)

Closes #1497
This commit is contained in:
Andrew Dryga
2023-03-10 13:55:46 -06:00
committed by GitHub
parent 49c5cd32e6
commit 2ed9ecfc56

View File

@@ -1,6 +1,8 @@
#!/bin/sh
: "${WIREGUARD_INTERFACE_NAME:=wg-firezone}"
# Note: we keep legacy default values for those variables to avoid breaking existing deployments,
# but they will go away in the 0.8.0 release.
: "${WIREGUARD_IPV4_ADDRESS:=10.3.2.1}"
: "${WIREGUARD_IPV4_ENABLED:=true}"
: "${WIREGUARD_IPV4_NETWORK:=10.3.2.0/24}"
@@ -15,8 +17,6 @@ setup_interface()
ip link add ${WIREGUARD_INTERFACE_NAME} type wireguard
fi
ip link add ${WIREGUARD_INTERFACE_NAME} type wireguard
if [ "$WIREGUARD_IPV4_ENABLED" = "true" ]; then
ip address replace ${WIREGUARD_IPV4_ADDRESS} dev ${WIREGUARD_INTERFACE_NAME}
fi