🎉 Improved Blueprints for Kiosk Mode & Production Readiness 🖱️
This commit is contained in:
@@ -182,10 +182,14 @@ def restart_system():
|
||||
def delayed_restart():
|
||||
time.sleep(2)
|
||||
try:
|
||||
from utils.core_system import safe_subprocess_run
|
||||
if os.name == 'nt': # Windows
|
||||
subprocess.run(["shutdown", "/r", "/t", "0"], check=True)
|
||||
result = safe_subprocess_run(["shutdown", "/r", "/t", "0"], timeout=10)
|
||||
else: # Linux/Unix
|
||||
subprocess.run(["sudo", "reboot"], check=True)
|
||||
result = safe_subprocess_run(["sudo", "reboot"], timeout=10)
|
||||
|
||||
if not result or result.returncode != 0:
|
||||
kiosk_logger.error("System-Neustart-Befehl fehlgeschlagen")
|
||||
except Exception as e:
|
||||
kiosk_logger.error(f"Fehler beim System-Neustart: {str(e)}")
|
||||
|
||||
|
Reference in New Issue
Block a user