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 , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: