🎉 Improved Blueprints for Kiosk Mode & Production Readiness 🖱️

This commit is contained in:
Till Tomczak
2025-06-20 09:19:15 +02:00
parent 0360d8c386
commit 268a270f1c
5 changed files with 34 additions and 24 deletions

View File

@@ -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)}")