~修复因.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

@@ -8,7 +8,7 @@
[ ! -f "$TMPDIR" ] && mkdir -p "$TMPDIR"
#当上次启动失败时终止自启动
[ -f "CRASHDIR"/.start_error ] && exit 1
[ -f "$CRASHDIR"/.start_error ] && exit 1
#加载工具
. "$CRASHDIR"/libs/check_cmd.sh
. "$CRASHDIR"/libs/check_target.sh

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