Update server.py

This commit is contained in:
Neythen Treloar 2021-12-16 14:49:34 +00:00 committed by GitHub
parent ae9ee1b751
commit 53717b095e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -282,6 +282,13 @@ def edit_wpa_sup(country, ssid, pwd):
wpa_lines = wpa_lines[0:3]
print(wpa_lines)
# create new file from scratch
wpa_lines = []
wpa_lines.append('ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev')
wpa_lines.append('update_config=1')
wpa_lines.append('country={}\n'.format(country)')
wpa_lines.append('\n')
wpa_lines.append('network={\n')
wpa_lines.append('\tssid="{}"\n'.format(ssid))