mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-12 08:21:40 +00:00
Compare commits
6 Commits
1.9.5alpha
...
1.9.4rc2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48705a0dd9 | ||
|
|
4a2a982c8d | ||
|
|
6e41971725 | ||
|
|
bbe711b1ce | ||
|
|
ee523035a6 | ||
|
|
847010399d |
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
meta_v=v1.19.17
|
meta_v=v1.19.17
|
||||||
singboxr_v=1.13.0-alpha.27
|
singboxr_v=1.13.0-alpha.27
|
||||||
versionsh=1.9.4rc1.1
|
versionsh=1.9.4rc1.3
|
||||||
GeoIP_v=20251205
|
GeoIP_v=20251205
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ core_unzip() { #$1:需要解压的文件 $2:目标文件名
|
|||||||
}
|
}
|
||||||
core_find(){
|
core_find(){
|
||||||
if [ ! -f "$TMPDIR"/CrashCore ];then
|
if [ ! -f "$TMPDIR"/CrashCore ];then
|
||||||
core_dir=$(find "$BINDIR"/CrashCore.* $find_para 2>/dev/null)
|
[ -n "$(find "$CRASHDIR"/CrashCore.* $find_para 2>/dev/null)" ] &&
|
||||||
|
mv -f "$CRASHDIR"/CrashCore.* "$BINDIR"/
|
||||||
|
core_dir=$(find "$BINDIR"/CrashCore.* $find_para 2>/dev/null | head -n 1)
|
||||||
[ -n "$core_dir" ] && core_unzip "$core_dir" CrashCore
|
[ -n "$core_dir" ] && core_unzip "$core_dir" CrashCore
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ bot_tg_start(){
|
|||||||
}
|
}
|
||||||
bot_tg_stop(){
|
bot_tg_stop(){
|
||||||
cronset 'TG_BOT守护进程'
|
cronset 'TG_BOT守护进程'
|
||||||
[ -f "$TMPDIR/bot_tg.pid" ] && kill -TERM "$(cat "$TMPDIR/bot_tg.pid")"
|
[ -f "$TMPDIR/bot_tg.pid" ] && kill -TERM "$(cat "$TMPDIR/bot_tg.pid")" 2>/dev/null
|
||||||
killall bot_tg.sh 2>/dev/null
|
killall bot_tg.sh 2>/dev/null
|
||||||
rm -f "$TMPDIR/bot_tg.pid"
|
rm -f "$TMPDIR/bot_tg.pid"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -71,9 +71,11 @@ stop)
|
|||||||
cronset '保守模式守护进程'
|
cronset '保守模式守护进程'
|
||||||
cronset '运行时每'
|
cronset '运行时每'
|
||||||
cronset '流媒体预解析'
|
cronset '流媒体预解析'
|
||||||
|
#停止tg_bot
|
||||||
|
. "$CRASHDIR"/menus/bot_tg_service.sh && bot_tg_stop
|
||||||
#多种方式结束进程
|
#多种方式结束进程
|
||||||
if [ -f "$TMPDIR/shellcrash.pid" ];then
|
if [ -f "$TMPDIR/shellcrash.pid" ];then
|
||||||
kill -TERM "$(cat "$TMPDIR/shellcrash.pid")"
|
kill -TERM "$(cat "$TMPDIR/shellcrash.pid")" 2>/dev/null
|
||||||
rm -f "$TMPDIR/shellcrash.pid"
|
rm -f "$TMPDIR/shellcrash.pid"
|
||||||
stop_firewall
|
stop_firewall
|
||||||
elif [ "$USER" = "root" ] && grep -q 'systemd' /proc/1/comm; then
|
elif [ "$USER" = "root" ] && grep -q 'systemd' /proc/1/comm; then
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
# Copyright (C) Juewuy
|
# Copyright (C) Juewuy
|
||||||
|
|
||||||
CRASHDIR="$(uci get firewall.ShellCrash.path | sed 's/\/starts.*//')"
|
CRASHDIR="$(uci get firewall.ShellCrash.path | sed 's/\/starts.*//')"
|
||||||
|
#防止提前自启
|
||||||
|
/etc/init.d/shellcrash disable
|
||||||
|
crontab -l | grep -v 'start_legacy_wd.sh shellcrash' | crontab -
|
||||||
|
#防止usb未加载
|
||||||
i=0
|
i=0
|
||||||
while [ ! -f "$CRASHDIR/configs/ShellCrash.cfg" ]; do
|
while [ ! -f "$CRASHDIR/configs/ShellCrash.cfg" ]; do
|
||||||
[ $i -gt 20 ] && exit 1
|
[ $i -gt 20 ] && exit 1
|
||||||
@@ -62,7 +66,10 @@ auto_start(){
|
|||||||
chmod 755 /etc/init.d/shellcrash
|
chmod 755 /etc/init.d/shellcrash
|
||||||
}
|
}
|
||||||
#初始化环境变量
|
#初始化环境变量
|
||||||
grep -q '^export CRASHDIR=' '/etc/profile' && . "$CRASHDIR"/libs/set_profile.sh && set_profile '/etc/profile'
|
grep -q '^export CRASHDIR=' '/etc/profile' || {
|
||||||
|
. "$CRASHDIR"/libs/set_profile.sh
|
||||||
|
set_profile '/etc/profile'
|
||||||
|
}
|
||||||
#启动服务
|
#启动服务
|
||||||
if [ ! -f "$CRASHDIR"/.dis_startup ]; then
|
if [ ! -f "$CRASHDIR"/.dis_startup ]; then
|
||||||
#AX6S/AX6000修复tun功能
|
#AX6S/AX6000修复tun功能
|
||||||
|
|||||||
Reference in New Issue
Block a user