Refresh container sensor proxy installer
This commit is contained in:
parent
09ee968422
commit
8bafc1449f
1 changed files with 18 additions and 0 deletions
18
install.sh
18
install.sh
|
|
@ -1709,6 +1709,8 @@ fi'; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
refresh_container_proxy_installer "$CTID"
|
||||||
|
|
||||||
write_install_summary
|
write_install_summary
|
||||||
|
|
||||||
# Clean final output
|
# Clean final output
|
||||||
|
|
@ -1733,6 +1735,22 @@ fi'; then
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
refresh_container_proxy_installer() {
|
||||||
|
local target_ctid="$1"
|
||||||
|
if [[ "$IN_CONTAINER" == true ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if [[ -z "$target_ctid" ]]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local installer_url="https://raw.githubusercontent.com/${GITHUB_REPO}/${SOURCE_BRANCH:-main}/scripts/install-sensor-proxy.sh"
|
||||||
|
print_info "Refreshing sensor proxy installer inside container ${target_ctid}..."
|
||||||
|
if ! pct exec "$target_ctid" -- bash -c "set -euo pipefail; mkdir -p /usr/local/share/pulse; tmp=\$(mktemp); curl -fsSL --connect-timeout 10 --max-time 45 '${installer_url}' -o \$tmp && install -m 0755 \$tmp /usr/local/share/pulse/install-sensor-proxy.sh && rm -f \$tmp"; then
|
||||||
|
print_warn "Unable to refresh container installer; continuing with bundled version"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Compare two version strings
|
# Compare two version strings
|
||||||
# Returns: 0 if equal, 1 if first > second, 2 if first < second
|
# Returns: 0 if equal, 1 if first > second, 2 if first < second
|
||||||
compare_versions() {
|
compare_versions() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue