~修复部分小米设备无法开机启动的bug
~修复卸载命令未能移除增强启动命令的bug
This commit is contained in:
juewuy
2024-01-03 12:21:38 +08:00
parent 343e883070
commit d45d8ede5a
7 changed files with 12 additions and 3 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -3,4 +3,4 @@ clashpre_v=2022.11.25
clash_v=v1.7.1
meta_v=v1.17.0
GeoIP_v=20231230
versionsh=1.8.2g
versionsh=1.8.2h

View File

@@ -1815,6 +1815,7 @@ case "$1" in
echo " -t 测试模式"
echo " -h 帮助列表"
echo " -u 卸载脚本"
echo " -i 初始化脚本"
echo -----------------------------------------
echo " clash -s start 启动服务"
echo " clash -s stop 停止服务"
@@ -1832,6 +1833,9 @@ case "$1" in
-s)
$CRASHDIR/start.sh $2 $3 $4 $5 $6
;;
-i)
source $CRASHDIR/init.sh
;;
-st)
shtype=sh && [ -n "$(ls -l /bin/sh|grep -o dash)" ] && shtype=bash
$shtype -x $CRASHDIR/start.sh $2 $3 $4 $5 $6
@@ -1874,6 +1878,9 @@ case "$1" in
userdel -r shellclash 2>/dev/null
nvram set script_usbmount="" 2>/dev/null
nvram commit 2>/dev/null
uci delete firewall.ShellClash
uci delete firewall.ShellCrash
uci commit firewall
echo -----------------------------------------------
echo -e "\033[36m已卸载ShellCrash相关文件有缘再会\033[0m"
echo -e "\033[33m请手动关闭当前窗口以重置环境变量\033[0m"

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
version=1.8.2g
version=1.8.2h
setdir(){
dir_avail(){
@@ -214,6 +214,8 @@ fi
#镜像化OpenWrt(snapshot)额外设置
if [ "$systype" = "mi_snapshot" -o "$systype" = "ng_snapshot" ];then
chmod 755 $CRASHDIR/misnap_init.sh
uci delete firewall.ShellClash
uci delete firewall.ShellCrash
uci set firewall.ShellCrash=include
uci set firewall.ShellCrash.type='script'
uci set firewall.ShellCrash.path="$CRASHDIR/misnap_init.sh"

View File

@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright (C) Juewuy
CRASHDIR="$(uci get firewall.ShellClash.path | sed 's/\/misnap_init.sh//')"
CRASHDIR="$(uci get firewall.ShellCrash.path | sed 's/\/misnap_init.sh//')"
profile=/etc/profile
autoSSH(){