.
This commit is contained in:
@@ -124,7 +124,7 @@ def wpa(ssid):
|
|||||||
else:
|
else:
|
||||||
form = WPAForm()
|
form = WPAForm()
|
||||||
if form.validate_on_submit():
|
if form.validate_on_submit():
|
||||||
wpa = """country=GB # Your 2-digit country code
|
wpafile = """country=GB # Your 2-digit country code
|
||||||
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
|
||||||
network={{
|
network={{
|
||||||
ssid="{}"
|
ssid="{}"
|
||||||
@@ -142,7 +142,7 @@ network={{
|
|||||||
).stdout.decode("utf-8")
|
).stdout.decode("utf-8")
|
||||||
|
|
||||||
with open("/etc/wpa_supplicant/wpa_supplicant.conf", "wt") as f:
|
with open("/etc/wpa_supplicant/wpa_supplicant.conf", "wt") as f:
|
||||||
f.write(wpa)
|
f.write(wpafile)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
output = subprocess.run(
|
output = subprocess.run(
|
||||||
|
|||||||
Reference in New Issue
Block a user