From 8560f4cb8e484514a3cfe5afa6e348a68f26f8ef Mon Sep 17 00:00:00 2001 From: windyday <63159472+CoverUp137@users.noreply.github.com> Date: Sun, 22 Jun 2025 02:41:34 +0800 Subject: [PATCH] Update cns.sh --- cns/cns.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cns/cns.sh b/cns/cns.sh index 55b7847..6549715 100644 --- a/cns/cns.sh +++ b/cns/cns.sh @@ -71,9 +71,9 @@ InstallFiles() { fi mkdir -p "$cns_install_dir" || Error "Create cns install directory failed." cd "$cns_install_dir" || exit 1 - github_repo="https://github.com/CoverUp137/cns/releases/download/cns" + github_repo="https://gh.0507.dpdns.org/https://github.com/CoverUp137/cns/releases/download/cns" $download_tool_cmd cns "$github_repo/cns-linux-${machine}${softfloat}" || Error "cns download failed." - $download_tool_cmd cns.init https://raw.githubusercontent.com/CoverUp137/cns/refs/heads/main/cns/cns.init || Error "cns.init download failed." + $download_tool_cmd cns.init https://gh.0507.dpdns.org/https://raw.githubusercontent.com/CoverUp137/cns/refs/heads/main/cns/cns.init || Error "cns.init download failed." [ -f '/etc/rc.common' ] && rcCommon='/etc/rc.common' sed -i "s~#!/bin/sh~#!$SHELL $rcCommon~" cns.init sed -i "s~\[cns_start_cmd\]~$cns_start_cmd~g" cns.init @@ -100,7 +100,7 @@ InstallFiles() { EOF chmod -R +rwx "$cns_install_dir" /etc/init.d/cns if type systemctl && [ -z "$(systemctl --failed|grep -q 'Host is down')" ]; then - $download_tool_cmd /lib/systemd/system/cns.service https://raw.githubusercontent.com/CoverUp137/cns/refs/heads/main/cns/cns.service || Error "cns.service download failed." + $download_tool_cmd /lib/systemd/system/cns.service https://gh.0507.dpdns.org/https://raw.githubusercontent.com/CoverUp137/cns/refs/heads/main/cns/cns.service || Error "cns.service download failed." chmod +rwx /lib/systemd/system/cns.service sed -i "s~\[cns_install_dir\]~$cns_install_dir~g" /lib/systemd/system/cns.service systemctl daemon-reload