编辑文件 cns.sh
This commit is contained in:
+4
-4
@@ -13,7 +13,7 @@ Delete() {
|
|||||||
"$cns_install_dir"/cns.init stop
|
"$cns_install_dir"/cns.init stop
|
||||||
rm -rf "$cns_install_dir"
|
rm -rf "$cns_install_dir"
|
||||||
fi
|
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.
|
#Print error message and exit.
|
||||||
@@ -128,13 +128,13 @@ AddAutoStart() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if type systemctl &>/dev/null && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
|
if type systemctl &>/dev/null && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
|
||||||
if systemctl enable cns &>/dev/null; then
|
if systemctl enable Acns &>/dev/null; then
|
||||||
echo '已添加开机自启, 如需关闭请执行: systemctl disable cns'
|
echo '已添加开机自启, 如需关闭请执行: systemctl disable Acns'
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if type chkconfig &>/dev/null; then
|
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'
|
echo '已添加开机自启, 如需关闭请执行: chkconfig Acns off'
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user