Hello fellow friends,
I’m trying to set up a number of trytond servers in multiple VENVs, using an ubuntu server. To keep them up, it would be nice to run them as system services. So I tried to create a /etc/systemd/system/my-trytond.service
, inspired by a number of web hits, containing as follows:
[Unit]
Description=start my-trytond
After=network.target
After=postgresql.service
StartLimitIntervalSec=5
[Service]
Type=simple
RestartSec=5
User=wd
ExecStartPre= /usr/bin/bash -c 'cd /home/path-to-my-venv/my-trytond && source bin/activate'
ExecStart= /usr/bin/python /home/path-to-my-venv/my-trytond/bin/trytond -c /home/path-to-my-venv/my-trytond/trytond.conf -d my-database
Restart=on-failure
[Install]
WantedBy=multi-user.target
The ExecStartPre
part seems to be successful, the ExecStart
bit fails with (code=exited, status=1/FAILURE)
.
Could somebody tell me how to make it work?
Thanks a lot in advance, Wolf