mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-10 23:41:22 +00:00
~重写保守模式启动函数,现在启动停止不会有额外kill命令报错,并且增加了对tg_bot脚本的启动支持
~新增tg_bot脚本的定时任务守护进程功能 ~新增公网防火墙禁用时的警告确认功能 ~优化小米路由自启脚本,现在自启脚本单独存放为/data/shellcrash_init.sh,且在卸载脚本时会保留改脚本并保留软固化功能 ~优化小米自动清理功能,适配更多设备 ~修复本地自解压安装时脚本报错bug ~修复小米等设备无法使用tg_bot控制机器人的问题
This commit is contained in:
@@ -40,7 +40,7 @@ if [ -n "$test" -o -n "$(pidof CrashCore)" ]; then
|
||||
cronset '2fjdi124dd12s' "$line"
|
||||
done <"$CRASHDIR"/task/running
|
||||
}
|
||||
[ "$start_old" = "已开启" ] && cronset '保守模式守护进程' "* * * * * test -z \"\$(pidof CrashCore)\" && $CRASHDIR/start.sh daemon #ShellCrash保守模式守护进程"
|
||||
[ "$start_old" = "已开启" ] && cronset '保守模式守护进程' "* * * * * /bin/sh $CRASHDIR/starts/start_legacy_wd.sh shellcrash #ShellCrash保守模式守护进程"
|
||||
#加载条件任务
|
||||
[ -s "$CRASHDIR"/task/afstart ] && { . "$CRASHDIR"/task/afstart; } &
|
||||
[ -s "$CRASHDIR"/task/affirewall -a -s /etc/init.d/firewall -a ! -f /etc/init.d/firewall.bak ] && {
|
||||
@@ -51,10 +51,7 @@ if [ -n "$test" -o -n "$(pidof CrashCore)" ]; then
|
||||
sed -i "${line}a\\. $CRASHDIR/task/affirewall" /etc/init.d/firewall
|
||||
} &
|
||||
#启动TG机器人
|
||||
[ "$bot_tg_service" = ON ] && {
|
||||
setsid sh "$CRASHDIR/menus/bot_tg.sh" &
|
||||
echo $! > "$TMPDIR/bot_tg.pid"
|
||||
}
|
||||
[ "$bot_tg_service" = ON ] && . "$CRASHDIR"/menus/bot_tg_service.sh && bot_tg_start
|
||||
exit 0
|
||||
else
|
||||
. "$CRASHDIR"/starts/start_error.sh
|
||||
|
||||
Reference in New Issue
Block a user