solved
The issue caused by the user-setting of systemd. I don't know why it works in shell as user hts but not in systemd as user hts but as long as it works (and tvheadend doesn't run as root) I'm fine:
working tvheadend.service (ubuntu LTS):
[Unit]
Description=tvheadend
Wants=network.target
[Service]
PIDFile=/run/tvheadend.pid
Type=simple
ExecStart=/usr/bin/tvheadend -s -c /data/hts/config -u hts -g hts -p /run/tvheadend.pid
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
-----------------
Hi,
I'm running tvheadend connected to a local CA-card via oscam, sat-ip receivers as source and RPI2/3 as clients.
Recently I updated to the most recent tvheadend version, updated the systemd-scripts and added a monit-config, to supervise tvheadend.
Now I can run tvheadend in console (as root or user hts) but not using systemd, because the latter seems to exit/crash.
I disabled caclient because starting with systemd even caused issues there - without any success.
[....]
Apr 14 07:50:24 hts tvheadend[13034]: mpegts: 11876H in Astra 19.2E (0x557118510730) - deleting
Apr 14 07:50:24 hts tvheadend[13034]: epgdb: save start
Apr 14 07:50:25 hts tvheadend[13034]: epgdb: stored (size 2877421)
Apr 14 07:50:25 hts tvheadend[13034]: STOP: Exiting HTS Tvheadend
root@hts:~# systemctl status tvheadend.service
● tvheadend.service - tvheadend
Loaded: loaded (/etc/systemd/system/tvheadend.service; enabled; vendor preset: enabled)
Active: inactive (dead) since Fre 2017-04-14 07:50:25 CEST; 5min ago
Process: 13031 ExecStart=/bin/sh -c /usr/bin/tvheadend -f -s -c /data/hts/config -u hts -g hts -p /run/tvheadend.pid -a -1 --satip_xml http://10.19.11.10:8080/desc.xml --satip
Main PID: 13031 (code=exited, status=0/SUCCESS)
The config files:
[Unit]
Description=tvheadend
Wants=network.target
[Service]
User=hts
PIDFile=/run/tvheadend.pid
Type=simple
# BusName=org.tvheadend.server
ExecStart=/usr/bin/tvheadend -f -s -c /data/hts/config -u hts -g hts -p /run/tvheadend.pid -a -1 --satip_xml http://10.19.11.10:8080/desc.xml --satip_xml http://10.19.12.10:8080/desc.xml --satip_xml http://10.19.13.50:80/rootDescr
# Restart=always
# RestartSec=9
[Install]
WantedBy=multi-user.target
Is there anything I missed? Might it be a bug in the latest tvheadend version?
kind regards