Skip to content
Snippets Groups Projects
Commit 40f1f781 authored by Simon Lejeune's avatar Simon Lejeune
Browse files

[FIX] packaging: redhat: use a log file

Without this, odoo log outputs to stdout and is catched by journald. We
force the use of a log file to keep the behavior consistent with the
debian package.
parent ec4b5f5c
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ ODOO_CONFIGURATION_FILE=$ODOO_CONFIGURATION_DIR/odoo.conf
ODOO_DATA_DIR=/var/lib/odoo
ODOO_GROUP="odoo"
ODOO_LOG_DIR=/var/log/odoo
ODOO_LOG_FILE=$ODOO_LOG_DIR/odoo-server.log
ODOO_USER="odoo"
if ! getent passwd | grep -q "^odoo:"; then
......@@ -43,7 +44,7 @@ chown $ODOO_USER:$ODOO_GROUP $ODOO_DATA_DIR
INIT_FILE=/lib/systemd/system/odoo.service
touch $INIT_FILE
chmod 0700 $INIT_FILE
cat << 'EOF' > $INIT_FILE
cat << EOF > $INIT_FILE
[Unit]
Description=Odoo Open Source ERP and CRM
After=network.target
......@@ -52,7 +53,7 @@ After=network.target
Type=simple
User=odoo
Group=odoo
ExecStart=/usr/bin/odoo --config=/etc/odoo/odoo.conf
ExecStart=/usr/bin/odoo --config $ODOO_CONFIGURATION_FILE --logfile $ODOO_LOG_FILE
[Install]
WantedBy=multi-user.target
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment