Creating an Upstart/sysvinit service

If you are using an older operating system, such as Debian 7, Ubuntu 15.04, or even 14.04, chances are that your system is sysvinit or Upstart. For the purpose of creating a system service, both should behave the same way. Many cloud VPS services are still based on Ubuntu 14.04 images, so this might be a scenario you may encounter when deploying your Odoo server.

The Odoo source code includes an init script used for the Debian packaged distribution. We can use it as our service init script with minor modifications, as follows:

$ sudo cp /home/odoo/odoo-11.0/debian/init /etc/init.d/odoo
$ sudo chmod +x /etc/init.d/odoo

At this point, you might want to check the content of the init script. The key parameters ...

Get Odoo 11 Development Essentials - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.