This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user