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 }