Files
ProxmoxVE/ct/glpi.sh
CanbiZ 7f798effd8 fix(ct): add setup_mariadb to update_script for repo updates
When MariaDB is installed with a specific version (e.g. 12.1.1), the
repository URL becomes stale when that version is removed from mirrors.
This causes 'apt update' to fail with 404 errors.

Adding setup_mariadb to update_script ensures the MariaDB repository
is updated to the current version before any apt operations run.

Affected scripts (31):
- 2fauth, apache-guacamole, booklore, bookstack, dolibarr
- domain-monitor, firefly, ghost, glpi, hortusfox
- invoiceninja, itsm-ng, kimai, leantime, librenms
- limesurvey, managemydamnlife, mariadb, monica, passbolt
- paymenter, pelican-panel, phpipam, plant-it, projectsend
- pterodactyl-panel, shinobi, snipeit, wallabag, wavelog, wordpress
2025-12-16 13:00:44 +01:00

49 lines
1.5 KiB
Bash

#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Nícolas Pastorello (opastorello)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.glpi-project.org/
APP="GLPI"
var_tags="${var_tags:-asset-management;foss}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-10}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/glpi ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
setup_mariadb
RELEASE=$(curl -fsSL 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_error "Currently we don't provide an update function for this ${APP}."
else
msg_ok "No update required. ${APP} is already at v${RELEASE}."
fi
exit
}
start
build_container
description
msg_ok "Completed Successfully!\n"
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:80${CL}"