Skip to content

Commit

Permalink
ffmuc-mesh-vpn-wireguard: move code together
Browse files Browse the repository at this point in the history
  • Loading branch information
T0biii authored Sep 10, 2024
1 parent ed68c70 commit e59d1f8
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e59d1f8

Please sign in to comment.