4 Commits

Author SHA1 Message Date
juewuy
0b7f7161b0 ~1.9.4release 2026-02-15 19:19:19 +08:00
juewuy
02a342cbd1 Merge branch 'master' of https://github.com/juewuy/ShellCrash into master
# Conflicts:
#	scripts/starts/start_legacy_wd.sh
2026-02-14 21:15:43 +08:00
juewuy
1fbade025a ~优化保守模式守护进程 2026-02-14 21:14:13 +08:00
juewuy
f5394120e1 ~优化保守模式守护进程 2026-02-14 20:30:53 +08:00
4 changed files with 14 additions and 12 deletions

Binary file not shown.

View File

@@ -1,4 +1,4 @@
meta_v=v1.19.17
singboxr_v=1.13.0-alpha.27
versionsh=1.9.4rc7.1
versionsh=1.9.4release
GeoIP_v=20251205

View File

@@ -1,14 +1,17 @@
[ -z "$CRASHDIR" ] && CRASHDIR=$(cd "$(dirname "$0")"/.. && pwd)
PIDFILE="/tmp/ShellCrash/$1.pid"
LOCKDIR="/tmp/ShellCrash/start_$1.lock"
[ -f "$CRASHDIR"/.start_error ] && [ ! -f /tmp/ShellCrash/crash_start_time ] && exit 1 #当启动失败后禁止开机自启动
mkdir "$LOCKDIR" 2>/dev/null || exit 1
if [ -f "$PIDFILE" ]; then
PID="$(cat "$PIDFILE")"
if [ -n "$PID" ] && [ "$PID" -eq "$PID" ] 2>/dev/null; then
if kill -0 "$PID" 2>/dev/null || [ -d "/proc/$PID" ]; then
return 0
rm -d "$LOCKDIR" 2>/dev/null
exit 0
fi
else
rm -f "$PIDFILE"
@@ -16,13 +19,12 @@ if [ -f "$PIDFILE" ]; then
fi
#如果没有进程则拉起
LOCKDIR="/tmp/ShellCrash/start_$1.lock"
if mkdir "$LOCKDIR" 2>/dev/null; then
if [ "$1" = "shellcrash" ]; then
"$CRASHDIR"/start.sh start
else
[ -f "$CRASHDIR/starts/start_legacy.sh" ] && . "$CRASHDIR/starts/start_legacy.sh"
killall bot_tg.sh 2>/dev/null
start_legacy "$CRASHDIR/menus/bot_tg.sh" "$1"
fi
rm -d "$LOCKDIR" 2>/dev/null
fi

View File

@@ -1 +1 @@
1.9.4rc7.1
1.9.4release