summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorSimon Lejeune <sle@openerp.com>2016-10-24 11:15:12 +0200
committerSimon Lejeune <sle@openerp.com>2016-10-24 12:51:52 +0200
commit40f1f781bd7955ae9723852221afb99f4fa4bd57 (patch)
tree623cf8fb8eaa6775f1e25505d8c8009b9c6c1af4 /setup
parentec4b5f5c583ab1341ec45a55e7ab7e9f59e924c2 (diff)
[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.
Diffstat (limited to 'setup')
-rw-r--r--setup/redhat/postinstall.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/setup/redhat/postinstall.sh b/setup/redhat/postinstall.sh
index cfc4f754233..94a225db9f4 100644
--- a/setup/redhat/postinstall.sh
+++ b/setup/redhat/postinstall.sh
@@ -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