Update pushbutton.py use Popen to run ttyd in background

pull/441/head
Alan Johnston 4 months ago committed by GitHub
parent 1336bcb751
commit e7e617959c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -150,8 +150,7 @@ if not GPIO.input(push_button): # if pushbutton is held down during boot
result = subprocess.run(['nmcli', 'connection', 'show'], capture_output=True, text=True)
print(result, flush=True)
sleep(2)
result = subprocess.run(['ttyd', '-p', '8080', 'bash', '&'], capture_output=True, text=True)
print(result, flush=True)
subprocess.Popen(['sudo', '-u', 'pi', 'ttyd', '-p', '8080', 'bash'])
GPIO.setup(powerPin, GPIO.OUT)
GPIO.output(powerPin, 1)

Loading…
Cancel
Save

Powered by TurnKey Linux.