Skip to content

Commit 39a38b6

Browse files
T0biiigrische
authored andcommitted
ffmuc-mesh-vpn-wireguard: move code together
1 parent 61ba5ab commit 39a38b6

File tree

1 file changed

+6
-6
lines changed
  • ffmuc-mesh-vpn-wireguard-vxlan/shsrc/lib/gluon/gluon-mesh-wireguard-vxlan

1 file changed

+6
-6
lines changed

ffmuc-mesh-vpn-wireguard-vxlan/shsrc/lib/gluon/gluon-mesh-wireguard-vxlan/checkuplink

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@ else
1818
exit
1919
fi
2020

21+
# Some legacy code seem to have used "true" instead of the canonical "1".
22+
# This should be overwritten by a gluon-reconfigure (see 400-mesh-vpn-wireguard)
23+
if [[ "${mesh_vpn_enabled}" != "1" ]]; then
24+
logger -p warn -t checkuplink "Invalid value for wireguard.mesh_vpn.enabled detected: '${mesh_vpn_enabled}'. Assuming enabled."
25+
fi
26+
2127
get_site_string() {
2228
local path="$1"
2329

@@ -209,12 +215,6 @@ is_connected() {
209215

210216
# start main logic
211217

212-
# Some legacy code seem to have used "true" instead of the canonical "1".
213-
# This should be overwritten by a gluon-reconfigure (see 400-mesh-vpn-wireguard)
214-
if [[ "${mesh_vpn_enabled}" != "1" ]]; then
215-
logger -p warn -t checkuplink "Invalid value for wireguard.mesh_vpn.enabled detected: '${mesh_vpn_enabled}'. Assuming enabled."
216-
fi
217-
218218
# Do we already have a private-key? If not generate one
219219
if ! uci -q get wireguard.mesh_vpn.privatekey > /dev/null
220220
then

0 commit comments

Comments
 (0)