Update pushbutton.py shutdown without -h

master-bw
Alan Johnston 2 months ago committed by GitHub
parent 4ce8cdb8b1
commit 7693b5b589
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -28,8 +28,9 @@ def change_mode():
os.system("echo 'reboot due to push button!' | wall")
GPIO.setwarnings(False)
GPIO.setup(powerPin, GPIO.OUT)
GPIO.output(powerPin, 0);
subprocess.call(['reboot', '-h', 'now'], shell=False)
GPIO.output(powerPin, 0);
os.system("sudo reboot now")
# subprocess.call(['reboot', '-h', 'now'], shell=False)
return
blink(1)
if GPIO.input(push_button):

Loading…
Cancel
Save

Powered by TurnKey Linux.