Thursday, 16 March 2017

How to Create service in odoo10

On Ubuntu 16.04, this is how you create a service for Odoo10:

[Unit]
Description=Odoo
Documentation=http://www.odoo.com/
[Service]
# Ubuntu/Debian convention:
Type=simple
User=odoo
ExecStart=/opt/odoo10/odoo-bin -c /etc/odoo-server.conf
[Install]
WantedBy=default.target


You put this in /etc/systemd/system and I called my file odoo10.service so you can then do:

sudo systemctl start odoo10.service (starts service)
sudo systemctl stop odoo10.service (stops service)
sudo systemctl restart odoo10.service (restarts Service)
sudo systemctl status odoo10.service (status of service)
sudo systemctl enable odoo10.service (starts service at boot)
sudo systemctl disable odoo10.service (disables service at boot)

No comments:

Post a Comment