I've created a service - /etc/systemd/system/sabnzbd.service
Code: Select all
[Unit]
Description=SABnzbd Usenet Client
After=network.target
[Service]
Type=simple
User=sab
Group=sab
ExecStart=/usr/bin/python -OO /usr/bin/sabnzbdplus --browser 0 &
ExecStop=/usr/bin/pkill sabnzbdplus
Restart=always
SyslogIdentifier=SABnzbd Usenet Client
[Install]
WantedBy=multi-default.target
~
but when i start it i see this error in status:
sab@myserv:~$ sudo systemctl start sabnzbd.service
sab@myserv:~$ sudo systemctl status sabnzbd.service
● sabnzbd.service - SABnzbd Usenet Client
Loaded: loaded (/etc/systemd/system/sabnzbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-10-30 21:43:15 UTC; 5s ago
Process: 10484 ExecStart=/usr/bin/python -OO /usr/bin/sabnzbdplus --browser 0 & (code=exited, status=2)
Main PID: 10484 (code=exited, status=2)
Oct 30 21:43:15 myserv systemd[1]: sabnzbd.service: Service hold-off time over, scheduling restart.
Oct 30 21:43:15 myserv systemd[1]: sabnzbd.service: Scheduled restart job, restart counter is at 5.
Oct 30 21:43:15 myserv systemd[1]: Stopped SABnzbd Usenet Client.
Oct 30 21:43:15 myserv systemd[1]: sabnzbd.service: Start request repeated too quickly.
Oct 30 21:43:15 myserv systemd[1]: sabnzbd.service: Failed with result 'exit-code'.
Oct 30 21:43:15 myserv systemd[1]: Failed to start SABnzbd Usenet Client.
what do I need to do to get this working?