~修复因.start_error失败标记导致的部分bug

This commit is contained in:
juewuy
2026-02-04 17:59:20 +08:00
parent fd4ca02ff3
commit cd7d4232b6
3 changed files with 4 additions and 2 deletions

View File

@@ -2,6 +2,8 @@
[ -z "$CRASHDIR" ] && CRASHDIR=$( cd $(dirname $0);cd ..;pwd)
PIDFILE="/tmp/ShellCrash/$1.pid"
[ -f "$CRASHDIR"/.start_error ] && [ ! -f /tmp/ShellCrash/crash_start_time ] && exit 1 #当启动失败后禁止开机自启动
if [ -f "$PIDFILE" ]; then
PID="$(cat "$PIDFILE")"
if [ -n "$PID" ] && [ -d "/proc/$PID" ]; then