From 8026ce7854a20548e108e4d6c21e4e271f23c583 Mon Sep 17 00:00:00 2001 From: "cnb.dg2025-08" Date: Sun, 14 Sep 2025 09:44:55 +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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cns/cns.sh b/cns/cns.sh index 2de5f33..a745d22 100644 --- a/cns/cns.sh +++ b/cns/cns.sh @@ -13,7 +13,7 @@ Delete() { "$cns_install_dir"/cns.init stop rm -rf "$cns_install_dir" fi - rm -f /etc/init.d/Acns /lib/systemd/system/Acns.service /etc/rc.d/rc5.d/S99cns /etc/rc.d/S99cns /etc/rc5.d/S99cns + rm -f /etc/init.d/Acns /lib/systemd/system/Acns.service /etc/rc.d/rc5.d/S99Acns /etc/rc.d/S99Acns /etc/rc5.d/S99Acns } #Print error message and exit. @@ -128,13 +128,13 @@ AddAutoStart() { fi fi if type systemctl &>/dev/null && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then - if systemctl enable cns &>/dev/null; then - echo '已添加开机自启, 如需关闭请执行: systemctl disable cns' + if systemctl enable Acns &>/dev/null; then + echo '已添加开机自启, 如需关闭请执行: systemctl disable Acns' return fi fi if type chkconfig &>/dev/null; then - if chkconfig --add Acns &>/dev/null && chkconfig cns on &>/dev/null; then + if chkconfig --add Acns &>/dev/null && chkconfig Acns on &>/dev/null; then echo '已添加开机自启, 如需关闭请执行: chkconfig Acns off' return fi