From d825af43f72012d7bc73b36a198a04ce5f124d46 Mon Sep 17 00:00:00 2001 From: juewuy Date: Sun, 23 Nov 2025 21:24:33 +0800 Subject: [PATCH] =?UTF-8?q?~=E5=B0=86=E8=84=9A=E6=9C=AC=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E6=BA=90=E6=9B=BF=E6=8D=A2=E4=B8=BAcfcdn=E6=BA=90=20~=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dddns=E8=84=9A=E6=9C=AC=E5=9C=A8openwrt=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E4=B8=8D=E5=8F=AF=E7=94=A8=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/menu.sh | 2 +- scripts/start.sh | 4 ++-- tools/ShellDDNS.sh | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/menu.sh b/scripts/menu.sh index b521a29..fb956ea 100644 --- a/scripts/menu.sh +++ b/scripts/menu.sh @@ -1965,7 +1965,7 @@ tools() { [ -f /etc/firewall.user ] && echo -e " 4 \033[32m配置\033[0m外网访问SSH" [ -x /usr/sbin/otapredownload ] && echo -e " 5 \033[33m$mi_update\033[0m小米系统自动更新" [ -f ${CRASHDIR}/misnap_init.sh ] && echo -e " 6 小米设备软固化SSH ———— \033[$mi_autoSSH_type \033[0m" - [ -f /etc/config/ddns -a -d "/etc/ddns" ] && echo -e " 7 配置\033[32mDDNS服务\033[0m(需下载相关脚本)" + [ -f /etc/config/ddns ] && echo -e " 7 配置\033[32mDDNS服务\033[0m(需下载相关脚本)" [ -f ${CRASHDIR}/misnap_init.sh ] && echo -e " 8 小米设备Tun模块修复 ———— \033[$mi_tunfix \033[0m" echo ----------------------------------------------- echo -e " 0 返回上级菜单" diff --git a/scripts/start.sh b/scripts/start.sh index a1e6a89..4d1e4fb 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -199,7 +199,7 @@ put_save() { #推送面板选择 } get_bin() { #专用于项目内部文件的下载 . "$CRASHDIR"/configs/ShellCrash.cfg >/dev/null - [ -z "$update_url" ] && update_url=https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@master + [ -z "$update_url" ] && update_url=https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@master if [ -n "$url_id" ]; then [ -z "$release_type" ] && release_type=master if [ "$url_id" = 101 -o "$url_id" = 104 ]; then @@ -2069,7 +2069,7 @@ webget) export all_proxy="http://${auth}127.0.0.1:$mix_port" url=$(echo $3 | sed 's#https://.*jsdelivr.net/gh/juewuy/ShellCrash[@|/]#https://raw.githubusercontent.com/juewuy/ShellCrash/#' | sed 's#https://gh.jwsc.eu.org/#https://raw.githubusercontent.com/juewuy/ShellCrash/#') else - url=$(echo $3 | sed 's#https://raw.githubusercontent.com/juewuy/ShellCrash/#https://fastly.jsdelivr.net/gh/juewuy/ShellCrash@#') + url=$(echo $3 | sed 's#https://raw.githubusercontent.com/juewuy/ShellCrash/#https://testingcf.jsdelivr.net/gh/juewuy/ShellCrash@#') fi #参数【$2】代表下载目录,【$3】代表在线地址 #参数【$4】代表输出显示,【$5】不启用重定向 diff --git a/tools/ShellDDNS.sh b/tools/ShellDDNS.sh index d352cbe..062d68a 100644 --- a/tools/ShellDDNS.sh +++ b/tools/ShellDDNS.sh @@ -4,7 +4,7 @@ ddns_dir=/etc/config/ddns tmp_dir=/tmp/ddns_$USER -[ ! -f "$ddns_dir" -o ! -d "/etc/ddns" ] && echo -e "本脚本依赖OpenWrt内置的DDNS服务,当前设备无法运行,已退出!" && exit 1 +[ ! -f "$ddns_dir" ] && echo -e "本脚本依赖OpenWrt内置的DDNS服务,当前设备无法运行,已退出!" && exit 1 echo ----------------------------------------------- echo -e "\033[30;46m欢迎使用ShellDDNS!\033[0m" echo -e "TG群:\033[36;4mhttps://t.me/ShellCrash\033[0m" @@ -135,15 +135,15 @@ rev_service() { load_ddns() { nr=0 - cat $ddns_dir | grep 'config service' | awk '{print $3}' | sed "s/\'//g" >$tmp_dir + cat $ddns_dir | grep 'config service' | awk '{print $3}' | sed "s/\'//g" | sed "s/\"//g" >$tmp_dir echo ----------------------------------------------- echo -e "列表 域名 启用 IP地址" echo ----------------------------------------------- for service in $(cat $tmp_dir); do - echo $service >>$tmp_dir + #echo $service >>$tmp_dir nr=$((nr + 1)) - enabled=$(uci show ddns.$service | grep 'enabled' | awk -F "\'" '{print $2}') - domain=$(uci show ddns.$service | grep 'domain' | awk -F "\'" '{print $2}') + enabled=$(uci show ddns.$service 2>/dev/null | grep 'enabled' | awk -F "\'" '{print $2}') + domain=$(uci show ddns.$service 2>/dev/null | grep 'domain' | awk -F "\'" '{print $2}') local_ip=$(cat /var/log/ddns/$service.log | grep 'Local IP' | tail -1 | awk -F "\'" '{print $2}') echo -e " $nr $domain $enabled $local_ip" done