Files
agento3/stop.sh

24 lines
538 B
Bash
Raw Permalink Normal View History

#!/bin/bash
# AO3 Mirror - 停止脚本
PID_DIR="/dev/shm/ao3"
echo "[Shutdown] Stopping AO3 Mirror workers..."
# Kill all workers
for pid_file in "$PID_DIR"/worker-*.pid; do
if [ -f "$pid_file" ]; then
pid=$(cat "$pid_file")
kill "$pid" 2>/dev/null || true
rm -f "$pid_file"
echo "[Shutdown] Killed PID $pid"
fi
done
# Force kill remaining processes on worker ports
for port in 8081 8082 8083 8084; do
fuser -k "${port}/tcp" 2>/dev/null || true
done
echo "[Shutdown] All workers stopped"