From 2391b5665b6294b4880f00a778fd0010d508254c Mon Sep 17 00:00:00 2001 From: tligui_y Date: Sat, 16 Aug 2025 15:24:45 +0200 Subject: [PATCH] Update start-notification-service.sh --- start-notification-service.sh | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/start-notification-service.sh b/start-notification-service.sh index 81ebd1b3e..9c5dc0f77 100644 --- a/start-notification-service.sh +++ b/start-notification-service.sh @@ -1,25 +1,23 @@ #!/bin/bash set -e -echo "[INFO] Starting fake org.freedesktop.Notifications service..." +echo "[DEBUG] Démarrage du service..." >&2 +# Démarrer le service en arrière-plan python3 start-notification-service.py & SERVICE_PID=$! -echo "[DEBUG] Service PID = $SERVICE_PID" -# attendre que le service soit dispo +# Attendre 2 secondes pour l'initialisation sleep 2 -echo "[DEBUG] Running gdbus introspect check..." -if gdbus introspect --session \ +echo "[DEBUG] Vérification du service..." >&2 +if ! gdbus introspect --session \ --dest org.freedesktop.Notifications \ - --object-path /org/freedesktop/Notifications; then - echo "[INFO] ✅ Service is running" -else - echo "[ERROR] ❌ Service not running" - kill $SERVICE_PID + --object-path /org/freedesktop/Notifications >/dev/null 2>&1; then + echo "[ERROR] Service non détecté" >&2 + kill $SERVICE_PID 2>/dev/null || true exit 1 fi -echo "[DEBUG] Writing PID to /tmp/notify-service.pid" echo $SERVICE_PID > /tmp/notify-service.pid +echo "[DEBUG] Service D-Bus actif (PID: $SERVICE_PID)" >&2 \ No newline at end of file