2026-10-08 13:39:17 +08:00
|
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
|
# shellcheck disable=SC1091
|
|
|
|
|
|
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common.sh"
|
|
|
|
|
|
|
2026-10-18 13:41:40 +08:00
|
|
|
|
for name in server ui mobile; do
|
2026-10-08 13:39:17 +08:00
|
|
|
|
pid_file="$RUNTIME_DIR/$name.pid"
|
|
|
|
|
|
if [[ -f "$pid_file" ]]; then
|
|
|
|
|
|
pid="$(cat "$pid_file")"
|
|
|
|
|
|
if kill -0 "$pid" 2>/dev/null; then kill "$pid"; echo "已停止 $name,PID $pid。"; fi
|
|
|
|
|
|
rm -f "$pid_file"
|
|
|
|
|
|
fi
|
|
|
|
|
|
done
|