diff --git a/bin/ShellCrash.tar.gz b/bin/ShellCrash.tar.gz index 8829e59..05926ac 100644 Binary files a/bin/ShellCrash.tar.gz and b/bin/ShellCrash.tar.gz differ diff --git a/bin/clashfm.tar.gz b/bin/clashfm.tar.gz index ad7068c..76e120d 100644 Binary files a/bin/clashfm.tar.gz and b/bin/clashfm.tar.gz differ diff --git a/bin/public.tar.gz b/bin/public.tar.gz index f49e0df..38a7ed6 100644 Binary files a/bin/public.tar.gz and b/bin/public.tar.gz differ diff --git a/bin/version b/bin/version index 48df02c..84c4bc9 100644 --- a/bin/version +++ b/bin/version @@ -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 diff --git a/scripts/clash.sh b/scripts/clash.sh index ecc1b23..b13af04 100644 --- a/scripts/clash.sh +++ b/scripts/clash.sh @@ -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" diff --git a/scripts/init.sh b/scripts/init.sh index f6431ef..cf79d05 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -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" diff --git a/scripts/misnap_init.sh b/scripts/misnap_init.sh index e324686..777df3c 100644 --- a/scripts/misnap_init.sh +++ b/scripts/misnap_init.sh @@ -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(){