first commit

This commit is contained in:
npc0-hue
2026-07-11 14:56:10 +08:00
commit 7e05d0a4e7
660 changed files with 78119 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
# shellcheck source=scripts/local-debug-env.sh
source "$ROOT_DIR/scripts/local-debug-env.sh"
if [[ ! -d "$LOCAL_DEBUG_PID_DIR" ]]; then
printf 'no local debug pid directory at %s\n' "$LOCAL_DEBUG_PID_DIR"
exit 0
fi
for name in platform_web run platform; do
pid_file="$LOCAL_DEBUG_PID_DIR/$name.pid"
if [[ ! -f "$pid_file" ]]; then
continue
fi
pid="$(cat "$pid_file")"
if kill -0 "$pid" 2>/dev/null; then
printf 'stopping %s pid %s\n' "$name" "$pid"
kill "$pid" 2>/dev/null || true
else
printf '%s pid %s is not running\n' "$name" "$pid"
fi
rm -f "$pid_file"
done