From 725975f33efd6ac85dfd0e95de2efcaee86e1688 Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Thu, 13 Jan 2022 09:36:06 -0800 Subject: [PATCH] Fix WireGuard script --- omnibus/files/firezone-scripts/wireguard | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/omnibus/files/firezone-scripts/wireguard b/omnibus/files/firezone-scripts/wireguard index fbaf55517..bffe5bf79 100755 --- a/omnibus/files/firezone-scripts/wireguard +++ b/omnibus/files/firezone-scripts/wireguard @@ -15,10 +15,10 @@ setup_interface() ip link add ${WIREGUARD_INTERFACE_NAME} type wireguard fi - if [[ $WIREGUARD_IPV4_ENABLED -eq "true" ]]; then + if [ $WIREGUARD_IPV4_ENABLED = "true" ]; then ip address replace ${WIREGUARD_IPV4_ADDRESS} dev ${WIREGUARD_INTERFACE_NAME} fi - if [[ $WIREGUARD_IPV6_ENABLED -eq "true" ]]; then + if [ $WIREGUARD_IPV6_ENABLED = "true" ]; then ip -6 address replace ${WIREGUARD_IPV6_ADDRESS} dev ${WIREGUARD_INTERFACE_NAME} fi ip link set mtu ${WIREGUARD_INTERFACE_MTU} up dev ${WIREGUARD_INTERFACE_NAME} @@ -28,10 +28,10 @@ setup_interface() add_routes() { - if [[ $WIREGUARD_IPV4_ENABLED -eq "true" ]]; then + if [ $WIREGUARD_IPV4_ENABLED = "true" ]; then ip route add ${WIREGUARD_IPV4_NETWORK} dev ${WIREGUARD_INTERFACE_NAME} fi - if [[ $WIREGUARD_IPV6_ENABLED -eq "true" ]]; then + if [ $WIREGUARD_IPV6_ENABLED = "true" ]; then ip -6 route add ${WIREGUARD_IPV6_NETWORK} dev ${WIREGUARD_INTERFACE_NAME} fi }