Fix openwrt wget fail (#33)

Openwrt use Busbox version, which don't support -t. Also we don't really neet `-t` to retry twice to download.
This commit is contained in:
周辉 2024-12-16 18:59:29 +08:00 committed by GitHub
parent 97ce2c4918
commit 434dcd0ad6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -141,7 +141,7 @@ install() {
NZ_AGENT_URL="https://${GITHUB_URL}/naibahq/agent/releases/download/${_version}/nezha-agent_${os}_${os_arch}.zip" NZ_AGENT_URL="https://${GITHUB_URL}/naibahq/agent/releases/download/${_version}/nezha-agent_${os}_${os_arch}.zip"
fi fi
_cmd="wget -t 2 -T 60 -O /tmp/nezha-agent_${os}_${os_arch}.zip $NZ_AGENT_URL >/dev/null 2>&1" _cmd="wget -T 60 -O /tmp/nezha-agent_${os}_${os_arch}.zip $NZ_AGENT_URL >/dev/null 2>&1"
if ! eval "$_cmd"; then if ! eval "$_cmd"; then
err "Download nezha-agent release failed, check your network connectivity" err "Download nezha-agent release failed, check your network connectivity"
exit 1 exit 1