Skip to content

Instantly share code, notes, and snippets.

@icarito
Created October 30, 2015 12:10
Show Gist options
  • Save icarito/bfac1e22192c3365fa74 to your computer and use it in GitHub Desktop.
Save icarito/bfac1e22192c3365fa74 to your computer and use it in GitHub Desktop.
diff --git a/odoo.py b/odoo.py
index 62de058..0549b51 100755
--- a/odoo.py
+++ b/odoo.py
@@ -129,7 +129,7 @@ def cmd_setup_deps():
setup_deps_debian(git_dir)
def setup_pg_debian(git_dir):
- cmd = ['sudo','su','-','postgres','-c','createuser -s %s' % os.environ['USER']]
+ cmd = ['sudo','su','-','postgres','-c','createuser -s %s' % 'odoo'] #os.environ['USER']]
subprocess.call(cmd)
def cmd_setup_pg():
@icarito
Copy link
Author

icarito commented Oct 30, 2015

A more clean solution would be to instruct the user to run setup_pg from a privileged account and force the "odoo" username

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment