Skip to content

Commit

Permalink
ffac-wg-registration: make HTTP fallback explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
grische committed Nov 20, 2023
1 parent 6c32e4a commit 7419353
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ if [ "$(uci get gluon.mesh_vpn.enabled)" = "true" ] || [ "$(uci get gluon.mesh_v
# check if registration has been done since last boot
if [ ! -f /tmp/WG_REGISTRATION_SUCCESSFUL ]; then
# Push public key to broker, test for https and use if supported
wget -q "https://[::1]"
if [ $? -eq 1 ]; then
PROTO=http
else
if wget -q "https://[::1]"
then
PROTO=https
else
PROTO=http
fi
PUBLICKEY=$(uci get network.wg_mesh.private_key | wg pubkey)
NODENAME=$(uci get system.@system[0].hostname)
Expand Down

0 comments on commit 7419353

Please sign in to comment.