#!/bin/bash # Update Daemon Script # This script updates the daemon to use the new dbus-next implementation set -e echo "=== Updating apt-ostree Daemon to dbus-next Implementation ===" echo # Check if we're in the right directory if [ ! -f "src/apt-ostree.py/python/apt_ostree_new.py" ]; then echo "❌ Error: apt_ostree_new.py not found. Please run from project root." exit 1 fi # Stop the current daemon echo "1. Stopping current daemon..." sudo systemctl stop apt-ostree.service || true # Copy the new service file echo "2. Updating service file..." sudo cp src/apt-ostree.py/systemd-symlinks/apt-ostree.service /etc/systemd/system/apt-ostree.service # Reload systemd echo "3. Reloading systemd..." sudo systemctl daemon-reload # Start the new daemon echo "4. Starting new daemon..." sudo systemctl start apt-ostree.service # Check status echo "5. Checking daemon status..." sleep 2 sudo systemctl status apt-ostree.service --no-pager -l echo echo "=== Daemon Update Complete ===" echo "The daemon has been updated to use the new dbus-next implementation." echo "You can now run the integration tests to verify it's working." echo echo "To run integration tests:" echo " ./run_integration_tests.sh"