Now we need to set up Odoo as a system service and have it started automatically when the system boots.
In Ubuntu or Debian, the init system is responsible for starting services. Historically, Debian (and derived operating systems) has used sysvinit, and Ubuntu has used a compatible system called Upstart. Recently, however, this has changed, and the init system used in both the latest Debian and Ubuntu editions is systemd.
This means that there are now two different ways to install a system service, and you need to pick the correct one depending on the version of your operating system.
On Ubuntu 16.04 and later, you should be using systemd. However, older versions are still used in many cloud providers, so there is a good chance that you might need to use it.
To check whether systemd is used in your system, try the following command...