From 7693b5b58972f63daff219f37581028e754b3e21 Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jul 2026 10:20:31 -0400 Subject: [PATCH] Update pushbutton.py shutdown without -h --- pushbutton.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pushbutton.py b/pushbutton.py index 3999dc3b..228323e2 100644 --- a/pushbutton.py +++ b/pushbutton.py @@ -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):