Update pushbutton.py turn wifi on

master-bw
Alan Johnston 2 months ago committed by GitHub
parent d1b4c30670
commit 3ee6413d00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -169,6 +169,8 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot
# result = subprocess.run(['nmcli', 'connection', 'down', 'preconfigured'], capture_output=True, text=True)
# print(result, flush=True) #.stdout)
# os.system("sudo nmcli connection up Hotspot-Manual")
result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True)
print(result, flush=True)
result = subprocess.run(['nmcli', 'connection', 'up', 'Hotspot-Manual'], capture_output=True, text=True)
print(result, flush=True) #.stdout)
# if (result.returncode != 0):
@ -181,6 +183,8 @@ else:
print(result, flush=True) #.stdout)
# result = subprocess.run(['nmcli', 'connection', 'down', 'Hotspot-Manual'], capture_output=True, text=True)
# print(result, flush=True) # .stdout)
result = subprocess.run(['nmcli', 'radio', 'wifi', 'on'], capture_output=True, text=True)
print(result, flush=True)
result = subprocess.run(['nmcli', 'connection', 'up', 'preconfigured'], capture_output=True, text=True)
print(result, flush=True) # .stdout)
# if (result.returncode != 0):

Loading…
Cancel
Save

Powered by TurnKey Linux.