OK, so you built your own from source.
Do a web search on systemd
and systemctl
, these tools are used to start services under Linux.
Your tvheadend.service
file should look something like this:.
[Unit]
Description=Tvheadend - a TV streaming server and DVR
# Add existing services you want started before Tvheadend, e.g, mount
# units..
# After=auditd.service syslog.target network.target local-fs.target mnt-recordings.mount
# See "man systemd.mount" or view https://www.freedesktop.org/software/systemd/man/systemd.mount.html
After=auditd.service syslog.target network.target local-fs.target
[Service]
EnvironmentFile=/etc/default/tvheadend
ExecStart=/usr/bin/tvheadend -f -p /run/tvheadend.pid $OPTIONS
PIDFile=/run/tvheadend.pid
Type=forking
Restart=on-failure
RestartSec=54s
# To enable watchdog functionality, uncomment these, remove Type=forking
# and compile with --enable-libsystemd_daemon
#Type=notify
#WatchdogSec=1m
#TimeoutStartSec=5m
#TimeoutStopSec=20
[Install]
WantedBy=multi-user.target
You can customise it however you would like. This is the one used by the deb package.