[IMP] Packaging: Debian, RedHat: No more superuser for odoo role

only create db
This commit is contained in:
Aaron Bohy
2014-12-15 10:41:10 +01:00
committed by Simon Lejeune
parent 42fbb5fd71
commit b6b73551db
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -13,8 +13,8 @@ case "${1}" in
if ! getent passwd | grep -q "^odoo:"; then
adduser --system --home $ODOO_DATA_DIR --quiet --group $ODOO_USER
fi
# Register "$ODOO_USER" as a postgres superuser
su - postgres -c "createuser -s $ODOO_USER" 2> /dev/null || true
# Register "$ODOO_USER" as a postgres user with "Create DB" role attribute
su - postgres -c "createuser -d -R -S $ODOO_USER" 2> /dev/null || true
# Configuration file
chown $ODOO_USER:$ODOO_GROUP $ODOO_CONFIGURATION_FILE
chmod 0640 $ODOO_CONFIGURATION_FILE
+2 -2
View File
@@ -13,8 +13,8 @@ if ! getent passwd | grep -q "^odoo:"; then
groupadd $ODOO_GROUP
adduser --system --no-create-home $ODOO_USER -g $ODOO_GROUP
fi
# Register "$ODOO_USER" as a postgres superuser
su - postgres -c "createuser -s $ODOO_USER" 2> /dev/null || true
# Register "$ODOO_USER" as a postgres user with "Create DB" role attribute
su - postgres -c "createuser -d -R -S $ODOO_USER" 2> /dev/null || true
# Configuration file
mkdir -p $ODOO_CONFIGURATION_DIR
# can't copy debian config-file as addons_path is not the same