Refactor: Alpine IT-Tools (#6579)

* Refactor

* Update

* Update deps
This commit is contained in:
Slaviša Arežina
2025-08-08 15:42:09 +02:00
committed by GitHub
parent d934d1b51b
commit e2a310dd3a
3 changed files with 15 additions and 16 deletions

View File

@@ -27,16 +27,15 @@ function update_script() {
exit 1
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
RELEASE=$(curl -fsSL https://api.github.com/repos/sharevb/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
if [ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ] || [ ! -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"
curl -fsSL "https://github.com/sharevb/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip" -o it-tools.zip
mkdir -p /usr/share/nginx/html
rm -rf /usr/share/nginx/html/*
$STD unzip it-tools.zip -d /tmp/it-tools
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
rm -rf /tmp/it-tools
$STD unzip it-tools.zip -d /tmp
cp -r /tmp/dist/* /usr/share/nginx/html
rm -rf /tmp/dist
rm -f it-tools.zip
msg_ok "Updated Successfully"
else