auto-sync: 2026-03-26 08:32:53
This commit is contained in:
@@ -3,19 +3,21 @@
|
||||
# 停止文件监控器
|
||||
# ============================================
|
||||
|
||||
if [ ! -f "../watcher.pid" ]; then
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
if [ ! -f "watcher.pid" ]; then
|
||||
echo "✓ No PID file found, watcher not running"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
PID=$(cat "../watcher.pid")
|
||||
PID=$(cat "watcher.pid")
|
||||
|
||||
if kill -0 $PID 2>/dev/null; then
|
||||
echo "✓ Stopping file watcher (PID $PID)"
|
||||
kill $PID
|
||||
rm -f "../watcher.pid"
|
||||
rm -f "watcher.pid"
|
||||
echo "✓ Stopped"
|
||||
else
|
||||
echo "✓ Process $PID not running, removing PID file"
|
||||
rm -f "../watcher.pid"
|
||||
rm -f "watcher.pid"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user