From 2c324c1329fdfa788d063166da93c5c1393a9ad5 Mon Sep 17 00:00:00 2001 From: "cnb.dg2025-08" Date: Sun, 14 Sep 2025 08:26:27 +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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cns/cns.sh b/cns/cns.sh index c627476..3bd7fbc 100644 --- a/cns/cns.sh +++ b/cns/cns.sh @@ -119,8 +119,8 @@ InstallInit() { AddAutoStart() { if [ -n "$rcCommon" ]; then - if /etc/init.d/cns enable; then - echo '已添加开机自启, 如需关闭请执行: /etc/init.d/cns disable' + if /etc/init.d/Acns enable; then + echo '已添加开机自启, 如需关闭请执行: /etc/init.d/Acns disable' return fi fi @@ -136,19 +136,19 @@ AddAutoStart() { return fi fi - if [ -d '/etc/rc.d/rc5.d' -a -f '/etc/init.d/cns' ]; then - if ln -s '/etc/init.d/cns' '/etc/rc.d/rc5.d/S99cns'; then + if [ -d '/etc/rc.d/rc5.d' -a -f '/etc/init.d/Acns' ]; then + if ln -s '/etc/init.d/Acns' '/etc/rc.d/rc5.d/S99cns'; then echo '已添加开机自启, 如需关闭请执行: rm -f /etc/rc.d/rc5.d/S99cns' return fi fi - if [ -d '/etc/rc5.d' -a -f '/etc/init.d/cns' ]; then - if ln -s '/etc/init.d/cns' '/etc/rc5.d/S99cns'; then + if [ -d '/etc/rc5.d' -a -f '/etc/init.d/Acns' ]; then + if ln -s '/etc/init.d/Acns' '/etc/rc5.d/S99cns'; then echo '已添加开机自启, 如需关闭请执行: rm -f /etc/rc5.d/S99cns' return fi fi - if [ -d '/etc/rc.d' -a -f '/etc/init.d/cns' ]; then + if [ -d '/etc/rc.d' -a -f '/etc/init.d/Acns' ]; then if ln -s '/etc/init.d/Acns' '/etc/rc.d/S99cns'; then echo '已添加开机自启, 如需关闭请执行: rm -f /etc/rc.d/S99cns' return