From e80218aeb5ad2acc1a00410be2f1495e5d68fbfd Mon Sep 17 00:00:00 2001 From: "cnb.dg2025-08" Date: Sun, 14 Sep 2025 08:40:57 +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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cns/cns.sh b/cns/cns.sh index 3bd7fbc..512ecf6 100644 --- a/cns/cns.sh +++ b/cns/cns.sh @@ -6,11 +6,14 @@ #Stop cns & delete cns files. Delete() { systemctl disable cns.service - rm -f /etc/init.d/Acns /lib/systemd/system/cns.service + chkconfig --del cns + /etc/init.d/Acns disable + if [ -f "${cns_install_dir:=/usr/local/cns}/cns.init" ]; then "$cns_install_dir"/cns.init stop rm -rf "$cns_install_dir" fi + rm -f /etc/init.d/Acns /lib/systemd/system/cns.service /etc/rc.d/rc5.d/S99cns /etc/rc.d/S99cns /etc/rc5.d/S99cns } #Print error message and exit.