#!/bin/bash echo "=== Testing apt-ostree Daemon ===" # Check if daemon is running echo "1. Checking if daemon is running..." if ps aux | grep -v grep | grep apt-ostreed > /dev/null; then echo "✅ Daemon is running" else echo "❌ Daemon is not running" echo "Starting daemon..." sudo /usr/libexec/apt-ostreed & sleep 3 fi # Check D-Bus registration echo "2. Checking D-Bus registration..." if busctl list | grep org.aptostree.dev > /dev/null; then echo "✅ Daemon is registered on D-Bus" else echo "❌ Daemon is not registered on D-Bus" exit 1 fi # Test ping method echo "3. Testing ping method..." if busctl call org.aptostree.dev /org/aptostree/dev/Daemon org.aptostree.dev.Daemon Ping 2>/dev/null; then echo "✅ Ping method works" else echo "❌ Ping method failed" fi # Test status method echo "4. Testing status method..." if busctl call org.aptostree.dev /org/aptostree/dev/Daemon org.aptostree.dev.Daemon Status 2>/dev/null; then echo "✅ Status method works" else echo "❌ Status method failed" fi echo "=== Test Complete ==="