Update cns.sh
This commit is contained in:
parent
ec6d5c23fd
commit
da76348863
1 changed files with 3 additions and 3 deletions
6
cns.sh
6
cns.sh
|
|
@ -74,8 +74,8 @@ InstallFiles() {
|
||||||
fi
|
fi
|
||||||
mkdir -p "$cns_install_dir" || Error "Create cns install directory failed."
|
mkdir -p "$cns_install_dir" || Error "Create cns install directory failed."
|
||||||
cd "$cns_install_dir" || exit 1
|
cd "$cns_install_dir" || exit 1
|
||||||
$download_tool_cmd cns https://gitcode.net/Dfsaadsa/Python/-/blob/0742cfc8c16676debef788f5cc0f4eb076edad9c/linux_${machine}${softfloat} || Error "cns download failed."
|
$download_tool_cmd cns https://gitcode.net/Dfsaadsa/Cns/-/raw/master/linux_${machine}${softfloat} || Error "cns download failed."
|
||||||
$download_tool_cmd cns.init https://gitcode.net/Dfsaadsa/Python/-/blob/0742cfc8c16676debef788f5cc0f4eb076edad9c/cns.init || Error "cns.init download failed."
|
$download_tool_cmd cns.init https://gitcode.net/Dfsaadsa/Cns/-/raw/master/cns.init || Error "cns.init download failed."
|
||||||
[ -f '/etc/rc.common' ] && rcCommon='/etc/rc.common'
|
[ -f '/etc/rc.common' ] && rcCommon='/etc/rc.common'
|
||||||
sed -i "s~#!/bin/sh~#!$SHELL $rcCommon~" cns.init
|
sed -i "s~#!/bin/sh~#!$SHELL $rcCommon~" cns.init
|
||||||
sed -i "s~\[cns_start_cmd\]~$cns_start_cmd~g" cns.init
|
sed -i "s~\[cns_start_cmd\]~$cns_start_cmd~g" cns.init
|
||||||
|
|
@ -102,7 +102,7 @@ InstallFiles() {
|
||||||
EOF
|
EOF
|
||||||
chmod -R +rwx "$cns_install_dir" /etc/init.d/cns
|
chmod -R +rwx "$cns_install_dir" /etc/init.d/cns
|
||||||
if type systemctl && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
|
if type systemctl && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then
|
||||||
$download_tool_cmd /lib/systemd/system/cns.service https://gitcode.net/Dfsaadsa/Python/-/blob/0742cfc8c16676debef788f5cc0f4eb076edad9c/cns.service || Error "cns.service download failed."
|
$download_tool_cmd /lib/systemd/system/cns.service https://gitcode.net/Dfsaadsa/Cns/-/raw/master/cns.service || Error "cns.service download failed."
|
||||||
chmod +rwx /lib/systemd/system/cns.service
|
chmod +rwx /lib/systemd/system/cns.service
|
||||||
sed -i "s~\[cns_install_dir\]~$cns_install_dir~g" /lib/systemd/system/cns.service
|
sed -i "s~\[cns_install_dir\]~$cns_install_dir~g" /lib/systemd/system/cns.service
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue