Display the splash screen when shutting down

- Also, turn the HDMI off after a short wait
This commit is contained in:
David Carley
2022-09-01 04:36:24 +00:00
parent cce4e17b49
commit 868258cfa7
6 changed files with 24 additions and 10 deletions

View File

@@ -21,18 +21,12 @@ def call_get_output(cmd):
class RebootHandler(bbctrl.APIHandler):
def put_ok(self):
subprocess.Popen(['plymouth', 'show-splash'])
subprocess.Popen(['plymouth', 'change-mode', '--shutdown'])
subprocess.Popen(['killall', 'xinit'])
subprocess.Popen(['reboot'])
class ShutdownHandler(bbctrl.APIHandler):
def put_ok(self):
subprocess.Popen(['plymouth', 'show-splash'])
subprocess.Popen(['plymouth', 'change-mode', '--shutdown'])
subprocess.Popen(['killall', 'xinit'])
subprocess.Popen(['shutdown', '-h', 'now'])