Repository navigation
Conversation
… update process
- Add `is_true` function to check explicitly that `GLPI_SKIP_AUTOUPDATE` and `GLPI_SKIP_AUTOINSTALL` are `"true"` or `1`.
- Fix `GLPI_Installed()` to intercept `bin/console db:check --no-interaction` failing exit code and prevent it from triggering the script exit due to `set -e` mode.
- Add support for database credential rotation: in `Install_GLPI()`, trigger database reconfiguration if `${GLPI_CONFIG_DIR}/config_db.php` already exists.
- Protect the database update process by enabling maintenance mode in `Update_GLPI()`.
Fixes glpi-project#327, glpi-project#328
Closes glpi-project#325, glpi-project#326
froozeify
requested changes
Oct 7, 2026
froozeify
left a comment
Member
There was a problem hiding this comment.
If the db update fail or cache clear fail the glpi will be stuck in maintenance mode. Not sure it's the way to handle that (specially in the case of a cache:clear failure)
After a fresh install I think it will run both condition block line 101 and 109 making an useless update call and greeting call.
- created a Reconfigure_GLPI() function, separate from Install_GLPI(), but sharing the same command. - moved the reconfiguration logic to GLPI_Installed() function, with a second db:check after reconfiguration. - only run the database update for existing installations, and not for new installations.
Author
|
@froozeify I've updated the script while taking into account your review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
is_truefunction to check explicitly thatGLPI_SKIP_AUTOUPDATEandGLPI_SKIP_AUTOINSTALLare"true"or1.GLPI_Installed()to interceptbin/console db:check --no-interactionfailing exit code and prevent it from triggering the script exit due toset -emode.Install_GLPI(), trigger database reconfiguration if${GLPI_CONFIG_DIR}/config_db.phpalready exists.Update_GLPI().Fixes #327, #328
Closes #325, #326