From e59d1f81c5fdbbf5d0cdbd6e89882663d05f11c0 Mon Sep 17 00:00:00 2001 From: Tobias <5702338+T0biii@users.noreply.github.com> Date: Tue, 10 Sep 2024 21:36:10 +0000 Subject: [PATCH] ffmuc-mesh-vpn-wireguard: move code together --- .../lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ffmuc-mesh-vpn-wireguard-vxlan/shsrc/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink b/ffmuc-mesh-vpn-wireguard-vxlan/shsrc/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink index f022cd49..8ebc920a 100755 --- a/ffmuc-mesh-vpn-wireguard-vxlan/shsrc/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink +++ b/ffmuc-mesh-vpn-wireguard-vxlan/shsrc/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink @@ -18,6 +18,12 @@ else exit fi +# Some legacy code seem to have used "true" instead of the canonical "1". +# This should be overwritten by a gluon-reconfigure (see 400-mesh-vpn-wireguard) +if [[ "${mesh_vpn_enabled}" != "1" ]]; then + logger -p warn -t checkuplink "Invalid value for wireguard.mesh_vpn.enabled detected: '${mesh_vpn_enabled}'. Assuming enabled." +fi + get_site_string() { local path="$1" @@ -209,12 +215,6 @@ is_connected() { # start main logic -# Some legacy code seem to have used "true" instead of the canonical "1". -# This should be overwritten by a gluon-reconfigure (see 400-mesh-vpn-wireguard) -if [[ "${mesh_vpn_enabled}" != "1" ]]; then - logger -p warn -t checkuplink "Invalid value for wireguard.mesh_vpn.enabled detected: '${mesh_vpn_enabled}'. Assuming enabled." -fi - # Do we already have a private-key? If not generate one if ! uci -q get wireguard.mesh_vpn.privatekey > /dev/null then