Skip to content

Instantly share code, notes, and snippets.

@moylop260
Last active May 18, 2023 23:55
Show Gist options
  • Save moylop260/7ee4b2e9d2051afa5ce8d0f713a609c8 to your computer and use it in GitHub Desktop.
Save moylop260/7ee4b2e9d2051afa5ce8d0f713a609c8 to your computer and use it in GitHub Desktop.
Odoo configuration file transform "DB_" variables to "PG" environment variables env postgresql postgres
eval $(sed -E 's/[a-z_ ]+ = /\U&/g;s/ //g;s/DB_/export PG/g' /home/odoo/.openerp_serverrc |grep export)
# psql -l |grep postg
# > psql: error: could not connect to server
# eval $(sed -E 's/[a-z_]+ = /\U&/g;s/ //g;s/DB_/export PG/g' /home/odoo/.openerp_serverrc |grep export)
# psql -l |grep postg
# > postgres | postgres | UTF8 | C | C.UTF-8 |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment