
上QQ阅读APP看书,第一时间看更新
How to do it...
To configure systemd to start Odoo, you need to perform the following steps:
- As root, create a file called /lib/systemd/system/odoo.service, with the following contents:
[Unit] Description=Odoo 11.0 After=postgresql.service [Service] Type=simple User=odoo Group=odoo
WorkingDirectory=/home/odoo/odoo-prod/project ExecStart=/home/odoo/odoo-prod/project/bin/start-odoo [Install] WantedBy=multi-user.target
- As root, register the service:
# systemctl enable odoo.service
- As root, start the service:
# service odoo start
- To stop the service, you can run the following:
# service odoo stop