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

only create db
master
Aaron Bohy 8 years ago committed by Simon Lejeune
parent 42fbb5fd71
commit b6b73551db
  1. 4
      debian/postinst
  2. 4
      setup/redhat/postinstall.sh

4
debian/postinst vendored

@ -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

@ -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

Loading…
Cancel
Save