[Unit] Description=Odoo IoT Box service After=network-online.target time-sync.target cups.socket NetworkManager.service rc-local.service Wants=network-online.target time-sync.target StartLimitIntervalSec=0 [Service] User=odoo Group=odoo Environment="LIBCAMERA_LOG_LEVELS=3" Environment="XDG_RUNTIME_DIR=/run/odoo" Environment="XDG_CACHE_HOME=/run/odoo" Environment="ODOO_PY_COLORS=True" ExecStartPre=sudo /bin/mkdir -p /run/odoo ExecStartPre=sudo /bin/chown odoo:odoo /run/odoo ExecStartPre=sudo timedatectl set-ntp true ExecStart=/usr/bin/python3 /home/pi/odoo/odoo-bin --config /home/pi/odoo.conf Restart=on-failure RestartSec=10s StandardOutput=null StandardError=append:/var/log/odoo/odoo-server.log [Install] WantedBy=multi-user.target # Tip: don't forget to 'systemctl disable' then re 'enable' service if you update the 'WantedBy' line # reason is that 'enable' creates a symlink in /etc/systemd/system/multi-user.target.wants/ pointing to this file which does # not get updated if you only 'systemctl daemon-reload' # Documentation: https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html