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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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

View File

@ -10,7 +10,7 @@
"privileged": false,
"interface_port": 80,
"documentation": null,
"website": "https://it-tools.tech/",
"website": "https://sharevb-it-tools.vercel.app/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/it-tools.webp",
"config_path": "",
"description": "IT-Tools is a web-based suite of utilities designed to streamline and simplify various IT tasks, providing tools for developers and system administrators to manage their workflows efficiently.",

View File

@ -14,17 +14,17 @@ network_check
update_os
msg_info "Installing Dependencies"
$STD apk add nginx
$STD apk add --no-cache \
nginx \
python3
msg_ok "Installed Dependencies"
msg_info "Installing IT-Tools"
RELEASE=$(curl -fsSL https://api.github.com/repos/CorentinTh/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
DOWNLOAD_URL="https://github.com/CorentinTh/it-tools/releases/download/${RELEASE}/it-tools-${RELEASE#v}.zip"
curl -fsSL -o it-tools.zip "$DOWNLOAD_URL"
RELEASE=$(curl -fsSL https://api.github.com/repos/sharevb/it-tools/releases/latest | grep '"tag_name":' | cut -d '"' -f4)
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
$STD unzip it-tools.zip -d /tmp/it-tools
cp -r /tmp/it-tools/dist/* /usr/share/nginx/html
$STD unzip it-tools.zip -d /tmp/
mv /tmp/dist/* /usr/share/nginx/html
cat <<'EOF' >/etc/nginx/http.d/default.conf
server {
listen 80;
@ -39,14 +39,14 @@ server {
EOF
$STD rc-update add nginx default
$STD rc-service nginx start
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
msg_ok "Installed IT-Tools"
motd_ssh
customize
msg_info "Cleaning up"
rm -rf /tmp/it-tools
rm -rf /tmp/dist
rm -f it-tools.zip
$STD apk cache clean
msg_ok "Cleaned"