Skip to content

Commit eb648a9

Browse files
authored
fix #40 (debian stretch)
1 parent 8e51aeb commit eb648a9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

main.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,17 +153,15 @@ def handle_wifi():
153153
ssid = request.form.get("wifi_ssid")
154154
psk = request.form.get("wifi_psk")
155155

156-
print(mode, ssid, psk)
157-
return "ok"
158156
logging.info("mode " + mode +" ssid: " + ssid + " psk: " + psk)
159157
client_params = " \"" + ssid + "\" \"" + psk + "\"" if ssid != "" and psk != "" else ""
160158
logging.info(client_params)
161-
os.system("sudo python wifi.py updatecfg " + mode + client_params)
159+
os.system("sudo ./wifi.py updatecfg " + mode + client_params)
162160
os.system("sudo reboot")
163161
if mode == "ap":
164-
return "http://coder.bot:8080"
162+
return "http://coder.bot"
165163
else:
166-
return "http://coderbot.local:8080"
164+
return "http://coderbot.local"
167165

168166
# Update the system
169167
@app.route("/update", methods=["GET"])

0 commit comments

Comments
 (0)