From 5c681eeca50274f0850e5c3e92fcb36b2d8a64ee Mon Sep 17 00:00:00 2001 From: "cnb.dg2025-08" Date: Sun, 14 Sep 2025 18:57:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=96=87=E4=BB=B6=20cns.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cns/cns.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cns/cns.sh b/cns/cns.sh index a687354..7d370e1 100644 --- a/cns/cns.sh +++ b/cns/cns.sh @@ -121,7 +121,7 @@ InstallInit() { } AddAutoStart() { - if [ -n "$rcCommon" ]; then + if [ -n "$rcCommon &>/dev/null" ]; then if /etc/init.d/Acns enable; then echo '已添加开机自启, 如需关闭请执行: /etc/init.d/Acns disable' return @@ -174,7 +174,7 @@ Install() { \r cns udp flag:\033[35G${cns_udp_flag:-httpUDP} \r cns encrypt password:\033[35G${cns_encrypt_password} \r cns tls server port:\033[35G${cns_tls_port} - \r`[ -f /etc/init.d/Acns ] && /etc/init.d/Acns usage || \"$cns_install_dir/cns.init\" usage`\033[0m + \r`[ -f /etc/init.d/Acns ] && /etc/init.d/Acns usage || \"$cns_install_dir/cns.init\" usage` \r`AddAutoStart`\033[0m" }