Tag Archives: tvheadend

Linux: TVHeadend and systemd

I upgraded my HTPC to Debian Jessie, which uses systemd. As a result, though the timer script here still works, the pm-suspend scripts don’t. I changed to using systemd services.

/etc/systemd/system/resume.service:

Unit]
Description=User resume actions
After=suspend.target

[Service]
User=%i
Type=simple
ExecStartPre=/sbin/modprobe saa7164
ExecStart=/bin/systemctl start tvheadend

[Install]
WantedBy=suspend.target

/etc/systemd/system/suspend.service:

[Unit]
Description=User suspend actions
Before=sleep.target

[Service]
User=%i
Type=simple
Environment=DISPLAY=:0
ExecStartPre=/bin/systemctl stop tvheadend ; /home/hts/.epg/timer.sh
ExecStart=/sbin/rmmod saa7164

[Install]
WantedBy=sleep.target

The timer script referenced in the suspend service is the same one linked above.

Advertisements
Tagged , , ,