Update glpi.sh

This commit is contained in:
Nícolas Pastorello 2025-01-03 09:25:02 -03:00 committed by GitHub
parent bf89286383
commit 2899ade99f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,10 +1,9 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: kristocopani
# License: MIT
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://semaphoreui.com/
# Author: Nícolas Pastorello (opastorello)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# App Default Values
APP="GLPI"
@ -37,12 +36,7 @@ function update_script() {
RELEASE=$(curl -s https://api.github.com/repos/glpi-project/glpi/releases/latest | grep '"tag_name"' | sed -E 's/.*"tag_name": "([^"]+)".*/\1/')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Updating ${APP} to v${RELEASE}"
cd /opt
wget -q https://github.com/semaphoreui/semaphore/releases/download/v${RELEASE}/semaphore_${RELEASE}_linux_amd64.deb
dpkg -i semaphore_${RELEASE}_linux_amd64.deb &>/dev/null
echo "${RELEASE}" >"/opt/${APP}_version.txt"
msg_ok "Updated ${APP} to v${RELEASE}"
msg_ok "Updated Successfully"
#Auto update under development
else
msg_ok "No update required. ${APP} is already at v${RELEASE}."
fi