save code

This commit is contained in:
Your Name
2026-03-19 23:51:21 +08:00
parent 71221ce1e3
commit 7e89edaa47
11 changed files with 1906 additions and 3 deletions
Executable
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/env bash
cd "$(dirname "$0")"
PID_FILE=proxy.pid
if [ ! -f "$PID_FILE" ]; then
echo "not running (no pid file)"
exit 1
fi
PID=$(cat "$PID_FILE")
if kill -0 "$PID" 2>/dev/null; then
kill "$PID"
rm -f "$PID_FILE"
echo "stopped (pid $PID)"
else
rm -f "$PID_FILE"
echo "stale pid file removed (process $PID not found)"
fi