编辑文件 cns.sh
This commit is contained in:
+2
-2
@@ -101,7 +101,7 @@ InstallFiles() {
|
||||
}
|
||||
EOF
|
||||
chmod -R +rwx "$cns_install_dir" /etc/init.d/Acns
|
||||
if type systemctl && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
|
||||
if type systemctl >/dev/null 2>&1 && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
|
||||
$download_tool_cmd /lib/systemd/system/Acns.service https://cnb.cool/dg2025-08/Cax/-/git/raw/main/cns/cns.service || Error "Acns.service download failed."
|
||||
chmod +rwx /lib/systemd/system/Acns.service
|
||||
sed -i "s~\[cns_install_dir\]~$cns_install_dir~g" /lib/systemd/system/Acns.service
|
||||
@@ -166,7 +166,7 @@ Install() {
|
||||
InstallInit
|
||||
InstallFiles
|
||||
"${cns_install_dir}/cns.init" start|grep -q FAILED && Error "cns install failed."
|
||||
type systemctl && [ -z "$(systemctl --failed|grep -q 'Host is down')" ] && systemctl restart cns
|
||||
type systemctl >/dev/null 2>&1 && [ -z "$(systemctl --failed|grep -q 'Host is down')" ] && systemctl restart cns
|
||||
echo $echo_e_arg \
|
||||
"\033[44;37mcns install success.\033[0;34m
|
||||
\r cns server port:\033[35G${cns_port}
|
||||
|
||||
Reference in New Issue
Block a user