Fix: Alpine IT-Tools Update (#2067)

* Fix: Alpine ITTools Update

* remove wget
This commit is contained in:
CanbiZ 2025-02-06 16:23:44 +01:00 committed by GitHub
parent 82fecd7bbd
commit f5a73a5449
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -29,13 +29,13 @@ function update_script() {
check_container_storage
check_container_resources
if [[ ! -d /usr/share/nginx/html ]]; then
if [ ! -d /usr/share/nginx/html ]; then
msg_error "No ${APP} Installation Found!"
exit
fi
exit 1
fi
RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
RELEASE=$(curl -s https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt 2>/dev/null)" ] || [ ! -f /opt/${APP}_version.txt ]; then
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
msg_info "Updating ${APP} LXC"
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
@ -46,10 +46,11 @@ function update_script() {
rm -rf /tmp/it-tools
rm -f it-tools.zip
msg_ok "Updated Successfully"
else
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
fi
exit 0
}
start