Stop map update claiming success when it actually fails

This commit is contained in:
Tim Wilkinson 2022-06-22 11:57:16 -07:00 committed by Joe AE6XE
parent f8d71b6552
commit b006c1040a
1 changed files with 2 additions and 2 deletions

View File

@ -274,11 +274,11 @@ if parms.button_uploaddata then
local newsi = string.format("%s,\"olsr\": %s}", si, topo) local newsi = string.format("%s,\"olsr\": %s}", si, topo)
-- PUT it to the server -- PUT it to the server
local upcurl = os.execute("curl -H 'Accept: application/json' -X PUT -d '" .. newsi .. "' http://data.arednmesh.org/sysinfo >/dev/null 2>&1") local upcurl = os.execute("curl -f -H 'Accept: application/json' -X PUT -d '" .. newsi .. "' http://data.arednmesh.org/sysinfo >/dev/null 2>&1")
if upcurl == 0 then if upcurl == 0 then
out("AREDN online map updated") out("AREDN online map updated")
else else
err("ERROR: Cannot update online map. Please ensure this node has access to the internet."); err("ERROR: Cannot update online map.");
end end
end end