Merge pull request #1241 from abcfy2/dev

使用兼容性更强的 `rm -fr` 代替 `rm -d` 删除锁目录
This commit is contained in:
juewuy
2026-03-22 05:14:38 -07:00
committed by GitHub

View File

@@ -10,7 +10,7 @@ if [ -f "$PIDFILE" ]; then
PID="$(cat "$PIDFILE")" PID="$(cat "$PIDFILE")"
if [ -n "$PID" ] && [ "$PID" -eq "$PID" ] 2>/dev/null; then if [ -n "$PID" ] && [ "$PID" -eq "$PID" ] 2>/dev/null; then
if kill -0 "$PID" 2>/dev/null || [ -d "/proc/$PID" ]; then if kill -0 "$PID" 2>/dev/null || [ -d "/proc/$PID" ]; then
rm -d "$LOCKDIR" 2>/dev/null rm -fr "$LOCKDIR" 2>/dev/null
exit 0 exit 0
fi fi
else else
@@ -27,4 +27,4 @@ else
start_legacy "$CRASHDIR/menus/bot_tg.sh" "$1" start_legacy "$CRASHDIR/menus/bot_tg.sh" "$1"
fi fi
rm -d "$LOCKDIR" 2>/dev/null rm -fr "$LOCKDIR" 2>/dev/null