mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
Compare commits
4 Commits
0589bc7881
...
1.9.4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b7f7161b0 | ||
|
|
02a342cbd1 | ||
|
|
1fbade025a | ||
|
|
f5394120e1 |
Binary file not shown.
@@ -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
|
||||
|
||||
@@ -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
|
||||
if [ "$1" = "shellcrash" ]; then
|
||||
"$CRASHDIR"/start.sh start
|
||||
else
|
||||
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
|
||||
|
||||
rm -d "$LOCKDIR" 2>/dev/null
|
||||
|
||||
Reference in New Issue
Block a user