fix: [check_error_odoo_log] adapt to compose status to get correct name

This commit is contained in:
Boris Gallet
2026-04-23 17:10:54 +02:00
parent b339aedc1d
commit 5158a315ec

View File

@@ -1,6 +1,10 @@
#!/bin/bash #!/bin/bash
ODOO_SERVICE_NAME=$(compose status -c name,charm -r | grep odoo-tecnativa | cut -d" " -f1) service_charm=$(compose status -c name,charm -r | grep odoo-tecnativa)
ODOO_SERVICE_NAME=${service_charm%% *}
# Retirer le préfixe "0:" s'il existe
[[ "$ODOO_SERVICE_NAME" == "0:"* ]] && ODOO_SERVICE_NAME=${ODOO_SERVICE_NAME#0:}
if [ -z "$ODOO_SERVICE_NAME" ]; then if [ -z "$ODOO_SERVICE_NAME" ]; then
echo "Odoo service not found" echo "Odoo service not found"