erplibre/script/database
Mathieu Benoit 292a03be8d [ADD] run: choisir la base au démarrage, sans jamais bloquer
« ./run.sh » sans argument partait sans base et l'on choisissait dans le
gestionnaire web. Il choisit maintenant : une seule base, il démarre
dessus ; plusieurs, il affiche un menu numéroté.

Ce qui décide n'est pas le menu mais l'endroit où il ne doit PAS s'ouvrir.
systemd écrit « ExecStart=/bin/bash …/run.sh » sans argument, avec
Restart=always : une question posée là serait une boucle de redémarrage.
Le défaut implicite exige donc un terminal sur stdin ET sur stderr — pas
stdout, qui est toujours un tube dans la substitution qui nous lit.
Mesuré : sans terminal, la ligne d'arguments est identique à l'octet et
la sonde, qui coûte 0,8 s, n'est jamais appelée.

--- EN ---

« ./run.sh » with no argument started without a database and one picked
in the web manager. It now picks: a single database, it starts on it;
several, it shows a numbered menu.

What decides is not the menu but where it must NOT open. systemd writes
« ExecStart=/bin/bash …/run.sh » with no argument and Restart=always: a
question asked there would be a restart loop. The implicit default
therefore requires a terminal on stdin AND on stderr — not stdout, which
is always a pipe inside the substitution that reads us. Measured: with no
terminal the argument line is byte-for-byte identical and the 0.8 s probe
is never called.

Assisted-by: Claude Opus 5
2026-08-23 17:26:41 -04:00
..
migrate [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
compare_backup.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
compare_database_application.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
db_drop_all.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
db_restore.py [FIX] security: keep the master password out of the command line 2026-08-23 02:11:50 -04:00
delete_production.sh [UPD] script: move script git, manifest, database, poetry, install 2023-01-02 21:54:20 -05:00
download_remote.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
download_remote.sh [IMP] todo support odoo upgrade 2025-10-31 01:43:26 -04:00
fix_mariadb_sql_example_1.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
get_module_list_from_database.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
get_repo_from_backup.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
get_repo_from_module.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
image_db.py [IMP] script: update copyright year to 2026 2026-03-11 23:16:05 -04:00
lib_db_select.sh [ADD] run: choisir la base au démarrage, sans jamais bloquer 2026-08-23 17:26:41 -04:00
list_remote.py [UPD] script Format 2026-03-14 23:26:31 -04:00
mariadb_sql_example_1.sql [UPD] makefile: improve test 2022-01-24 14:09:17 -05:00
migrate_prod_to_test.sh [IMP] refactoring to support multiple version of Odoo 2025-10-31 01:32:11 -04:00
README.base.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.fr.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
README.md [ADD] Multilingual translation of all documentation (EN/FR) 2026-03-04 22:23:52 -05:00
restore_mariadb_sql_example_1.sh [IMP] refactoring .venv.erplibre 2025-10-31 01:34:26 -04:00

Database

This section is for code generator database migrator.

This configuration is for development environnement.

You need to install script ./script/install/install_dev_extra_ubuntu.sh.

Restore database

Run script to restore database:

./script/database/restore_mariadb_sql_example_1.sh