#!/data/data/com.termux/files/usr/bin/bash # Stop all Android Agent Runtime services HOME="/data/data/com.termux/files/home" BASE="$HOME/.hermes/event_bus" stop_service() { local name="$1" local pid_file="$2" if [ -f "$pid_file" ]; then local pid pid=$(cat "$pid_file") if kill -0 "$pid" 2>/dev/null; then kill "$pid" && echo "[-] $name stopped (pid $pid)" else echo "[-] $name not running" fi rm -f "$pid_file" else echo "[-] $name: no pid file" fi } stop_service "EventServer" "$BASE/event_server.pid" stop_service "NotificationMonitor" "$BASE/notification_monitor.pid" echo "Done."