Skip to content

Commit

Permalink
[FIX] packaging: debian: set /var/lib/odoo as odoo user home dir
Browse files Browse the repository at this point in the history
  • Loading branch information
sle-odoo committed Oct 30, 2014
1 parent 7415732 commit b8f1ed1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions debian/postinst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ODOO_USER="odoo"
case "${1}" in
configure)
if ! getent passwd | grep -q "^odoo:"; then
adduser --system --no-create-home --quiet --group $ODOO_USER
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
Expand All @@ -23,7 +23,6 @@ case "${1}" in
chown $ODOO_USER:$ODOO_GROUP $ODOO_LOG_DIR
chmod 0750 $ODOO_LOG_DIR
# Data dir
mkdir -p $ODOO_DATA_DIR
chown $ODOO_USER:$ODOO_GROUP $ODOO_DATA_DIR
# update-python-modules NOW otherwise invoke-rc.d openerp start will fail
update-python-modules
Expand Down

0 comments on commit b8f1ed1

Please sign in to comment.