Skip to content

Commit 40f1f78

Browse files
committed
[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.
1 parent ec4b5f5 commit 40f1f78

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

setup/redhat/postinstall.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ODOO_CONFIGURATION_FILE=$ODOO_CONFIGURATION_DIR/odoo.conf
77
ODOO_DATA_DIR=/var/lib/odoo
88
ODOO_GROUP="odoo"
99
ODOO_LOG_DIR=/var/log/odoo
10+
ODOO_LOG_FILE=$ODOO_LOG_DIR/odoo-server.log
1011
ODOO_USER="odoo"
1112

1213
if ! getent passwd | grep -q "^odoo:"; then
@@ -43,7 +44,7 @@ chown $ODOO_USER:$ODOO_GROUP $ODOO_DATA_DIR
4344
INIT_FILE=/lib/systemd/system/odoo.service
4445
touch $INIT_FILE
4546
chmod 0700 $INIT_FILE
46-
cat << 'EOF' > $INIT_FILE
47+
cat << EOF > $INIT_FILE
4748
[Unit]
4849
Description=Odoo Open Source ERP and CRM
4950
After=network.target
@@ -52,7 +53,7 @@ After=network.target
5253
Type=simple
5354
User=odoo
5455
Group=odoo
55-
ExecStart=/usr/bin/odoo --config=/etc/odoo/odoo.conf
56+
ExecStart=/usr/bin/odoo --config $ODOO_CONFIGURATION_FILE --logfile $ODOO_LOG_FILE
5657
5758
[Install]
5859
WantedBy=multi-user.target

0 commit comments

Comments
 (0)