diff --git a/README.md b/README.md index f1e0e8d..bf2d0aa 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # GLPI for YunoHost -[![Integration level](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Working status](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Working status](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Install GLPI with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**Shipped version:** 10.0.15~ynh1 +**Shipped version:** 10.0.16~ynh1 ## Screenshots diff --git a/README_es.md b/README_es.md index c6b477b..a456539 100644 --- a/README_es.md +++ b/README_es.md @@ -5,7 +5,7 @@ No se debe editar a mano. # GLPI para Yunohost -[![Nivel de integración](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Instalar GLPI con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**Versión actual:** 10.0.15~ynh1 +**Versión actual:** 10.0.16~ynh1 ## Capturas diff --git a/README_eu.md b/README_eu.md index 98e2504..6c9d80a 100644 --- a/README_eu.md +++ b/README_eu.md @@ -5,7 +5,7 @@ EZ editatu eskuz. # GLPI YunoHost-erako -[![Integrazio maila](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Integrazio maila](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Instalatu GLPI YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**Paketatutako bertsioa:** 10.0.15~ynh1 +**Paketatutako bertsioa:** 10.0.16~ynh1 ## Pantaila-argazkiak diff --git a/README_fr.md b/README_fr.md index 21cb687..23ee9be 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main. # GLPI pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Installer GLPI avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -30,7 +30,7 @@ GLPI signifie Gestionnaire Libre de Parc Informatique. Il s'agit d'un progiciel - Base de connaissances et foire aux questions (FAQ) - Réservation d'actifs -**Version incluse :** 10.0.15~ynh1 +**Version incluse :** 10.0.16~ynh1 ## Captures d’écran diff --git a/README_gl.md b/README_gl.md index 816febb..358bbb4 100644 --- a/README_gl.md +++ b/README_gl.md @@ -5,7 +5,7 @@ NON debe editarse manualmente. # GLPI para YunoHost -[![Nivel de integración](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![Instalar GLPI con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**Versión proporcionada:** 10.0.15~ynh1 +**Versión proporcionada:** 10.0.16~ynh1 ## Capturas de pantalla diff --git a/README_zh_Hans.md b/README_zh_Hans.md index bb261b5..41ef2b1 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -5,7 +5,7 @@ # YunoHost 上的 GLPI -[![集成程度](https://dash.yunohost.org/integration/glpi.svg)](https://dash.yunohost.org/appci/app/glpi) ![工作状态](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) +[![集成程度](https://dash.yunohost.org/integration/glpi.svg)](https://ci-apps.yunohost.org/ci/apps/glpi/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/glpi.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/glpi.maintain.svg) [![使用 YunoHost 安装 GLPI](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=glpi) @@ -31,7 +31,7 @@ GLPI stands for Gestionnaire Libre de Parc Informatique is a Free Asset and IT M - Asset reservation -**分发版本:** 10.0.15~ynh1 +**分发版本:** 10.0.16~ynh1 ## 截图 diff --git a/manifest.toml b/manifest.toml index fb4994b..8956dea 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "GLPI" description.en = "IT Asset Management" description.fr = "Gestion des services informatiques (ITSM)" -version = "10.0.15~ynh1" +version = "10.0.16~ynh1" maintainers = [] @@ -41,10 +41,12 @@ ram.runtime = "50M" default = "visitors" [resources] - [resources.sources.main] - url = "https://github.com/glpi-project/glpi/releases/download/10.0.15/glpi-10.0.15.tgz" - sha256 = "8ce94c1403c1143a5b503f18f7b7b9a5d29e83489fc81cc7287b719df0b97236" - autoupdate.strategy = "latest_github_tag" + [resources.sources.main] + url = "https://github.com/glpi-project/glpi/releases/download/10.0.16/glpi-10.0.16.tgz" + sha256 = "2c49ea2104c6a107999b28160aa3283ed23b59fb0ba7f3899f1e388830365ce0" + + autoupdate.strategy = "latest_github_release" + autoupdate.asset = "^glpi-.*\\.tgz" [resources.system_user] @@ -54,7 +56,22 @@ ram.runtime = "50M" main.url = "/" [resources.apt] - packages = "mariadb-server, php8.2-cli, php8.2-curl, php8.2-fileinfo, php8.2-gd, php8.2-mbstring, php8.2-mysqli, php8.2-simplexml, php8.2-xml, php8.2-intl, php8.2-ldap, php8.2-xmlrpc, php8.2-bz2, php8.2-zip" + packages = [ + "mariadb-server", + "php8.2-cli", + "php8.2-curl", + "php8.2-fileinfo", + "php8.2-gd", + "php8.2-mbstring", + "php8.2-mysqli", + "php8.2-simplexml", + "php8.2-xml", + "php8.2-intl", + "php8.2-ldap", + "php8.2-xmlrpc", + "php8.2-bz2", + "php8.2-zip", + ] [resources.database] type = "mysql" diff --git a/scripts/backup b/scripts/backup index e4d961e..076d3dc 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -22,23 +20,13 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# BACKUP THE SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# BACKUP THE PHP-FPM CONFIGURATION -#================================================= - ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" -#================================================= -# SPECIFIC BACKUP -#================================================= -# BACKUP VARIOUS FILES -#================================================= - ynh_backup --src_path="/etc/cron.d/$app" #================================================= diff --git a/scripts/change_url b/scripts/change_url index be6cde0..57c3ede 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC STARTING #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,8 +7,6 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD MODIFICATIONS #================================================= # MODIFY URL IN NGINX CONF #================================================= @@ -18,15 +14,13 @@ ynh_script_progression --message="Updating NGINX web server configuration..." -- ynh_change_url_nginx_config -#================================================= -# SPECIFIC MODIFICATIONS #================================================= # ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression --message="Configuring $app..." --weight=1 -pushd $install_dir - php$phpversion bin/console glpi:config:set url_base https://$domain$path +pushd "$install_dir" + "php$phpversion" bin/console glpi:config:set url_base "https://$domain$path" popd #================================================= diff --git a/scripts/install b/scripts/install index 58fbb56..dfd9180 100644 --- a/scripts/install +++ b/scripts/install @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -20,6 +18,18 @@ ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" +#================================================= +# INSTALL THE DATABASE +#================================================= +ynh_script_progression --message="Installing $app..." --weight=1 + +pushd "$install_dir" + "php$phpversion" bin/console glpi:database:install --db-host="localhost" \ + --db-name="$db_name" --db-password="$db_pwd" --db-user="$db_user" --reconfigure --no-interaction + "php$phpversion" bin/console glpi:config:set url_base "https://$domain$path" + ynh_secure_remove --file="$install_dir/install/install.php" +popd + #================================================= # SYSTEM CONFIGURATION #================================================= @@ -33,19 +43,6 @@ ynh_add_nginx_config ynh_add_config --template="cron" --destination="/etc/cron.d/$app" -#================================================= -# SPECIFIC SETUP -#================================================= -# INSTALL THE DATABASE -#================================================= -ynh_script_progression --message="Installing $app..." --weight=1 - -pushd $install_dir - php$phpversion bin/console glpi:database:install --db-host="localhost" --db-name="$db_name" --db-password="$db_pwd" --db-user="$db_user" --reconfigure --no-interaction - php$phpversion bin/console glpi:config:set url_base https://$domain$path - ynh_secure_remove --file="$install_dir/install/install.php" -popd - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index b88f6a3..3a4f117 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= diff --git a/scripts/restore b/scripts/restore index 6a49b01..57f5420 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -18,14 +16,14 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$install_dir" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" #================================================= # RESTORE THE MYSQL DATABASE #================================================= ynh_script_progression --message="Restoring the MySQL database..." --weight=1 -ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" < ./db.sql #================================================= # RESTORE THE PHP-FPM CONFIGURATION @@ -38,14 +36,12 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/cron.d/$app" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM #================================================= ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload +ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1c87f75..7d2c1b8 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,22 +7,26 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# CHECK VERSION -#================================================= - -upgrade_type=$(ynh_check_app_version_changed) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression --message="Upgrading source files..." --weight=1 # Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$install_dir" #--full_replace=1 +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="config files marketplace plugins" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" +chown -R "$app:www-data" "$install_dir" + +#================================================= +# UPDATE THE DATABASE +#================================================= +ynh_script_progression --message="Updating the database..." --weight=1 + +pushd "$install_dir" + "php$phpversion" bin/console system:check_requirements + "php$phpversion" bin/console db:update --no-interaction --no-telemetry --force +popd #================================================= # REAPPLY SYSTEM CONFIGURATIONS @@ -39,17 +41,6 @@ ynh_add_nginx_config ynh_add_config --template="cron" --destination="/etc/cron.d/$app" -#================================================= -# SPECIFIC UPGRADE -#================================================= -# UPDATE THE DATABASE -#================================================= -ynh_script_progression --message="Updating the database..." --weight=1 - -pushd $install_dir - php$phpversion bin/console db:update --no-interaction --no-telemetry --force -popd - #================================================= # END OF SCRIPT #=================================================