mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-11 07:51:45 +00:00
~重写保守模式启动函数,现在启动停止不会有额外kill命令报错,并且增加了对tg_bot脚本的启动支持
~新增tg_bot脚本的定时任务守护进程功能 ~新增公网防火墙禁用时的警告确认功能 ~优化小米路由自启脚本,现在自启脚本单独存放为/data/shellcrash_init.sh,且在卸载脚本时会保留改脚本并保留软固化功能 ~优化小米自动清理功能,适配更多设备 ~修复本地自解压安装时脚本报错bug ~修复小米等设备无法使用tg_bot控制机器人的问题
This commit is contained in:
@@ -128,11 +128,18 @@ fi
|
||||
#镜像化OpenWrt(snapshot)额外设置
|
||||
if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ]; then
|
||||
chmod 755 "$CRASHDIR"/starts/snapshot_init.sh
|
||||
uci delete firewall.ShellClash 2>/dev/null
|
||||
if [ "$systype" = "mi_snapshot" ];then
|
||||
path="/data/shellcrash_init.sh"
|
||||
setconfig CRASHDIR "$CRASHDIR" "$CRASHDIR"/starts/snapshot_init.sh
|
||||
mv -f "$CRASHDIR"/starts/snapshot_init.sh "$path"
|
||||
else
|
||||
path="$CRASHDIR"/starts/snapshot_init.sh
|
||||
fi
|
||||
uci delete firewall.auto_ssh 2>/dev/null
|
||||
uci delete firewall.ShellCrash 2>/dev/null
|
||||
uci set firewall.ShellCrash=include
|
||||
uci set firewall.ShellCrash.type='script'
|
||||
uci set firewall.ShellCrash.path="$CRASHDIR/starts/snapshot_init.sh"
|
||||
uci set firewall.ShellCrash.path="$path"
|
||||
uci set firewall.ShellCrash.enabled='1'
|
||||
uci commit firewall
|
||||
else
|
||||
@@ -205,7 +212,7 @@ sed -i '/shellclash/d' /etc/group
|
||||
rm -rf /etc/init.d/clash
|
||||
rm -rf "$CRASHDIR"/rules
|
||||
[ "$systype" = "mi_snapshot" -a "$CRASHDIR" != '/data/clash' ] && rm -rf /data/clash
|
||||
for file in CrashCore clash.sh getdate.sh core.new clashservice log mark? mark.bak; do
|
||||
for file in tools webget.sh misnap_init.sh core.new; do
|
||||
rm -rf "$CRASHDIR/$file"
|
||||
done
|
||||
#旧版变量改名
|
||||
|
||||
Reference in New Issue
Block a user