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