diff --git a/entrypoint.sh b/entrypoint.sh index 26c7cd0b49ecd05878282e2db4f817d0e3466fca..5cf1d33e5c3154b1f7c10a725cf361d4db1df5f0 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -30,7 +30,14 @@ export PGUSER=$value check_config "db_password" "$PASSWORD" export PGPASSWORD=$value -psql -qc 'CREATE EXTENSION IF NOT EXISTS unaccent' +result="$(psql -qc 'CREATE EXTENSION IF NOT EXISTS unaccent' 2>&1)" +ok=$? +if [ $ok -eq 0 -a -z "$result" ]; then + echo "INFO Unaccent extension installed" +elif [ $ok -ne 0 ]; then + echo "WARNING Attempt to install unaccent in \ + $PGDATABASE@$PGHOST failed with this message: $result" +fi case "$1" in -- | odoo)