# Copyright 2011-2014 Lucian Muresan # Distributed under the terms of the GNU General Public License v2 [Unit] Description=Video Disk Recorder Daemon After=systemd-udevd.service lirc.service Requires=systemd-udevd.service DefaultDependencies=no [Service] # this will collect the parameters and set them into the VDR_OPTS # variable in the EnvironmentFile ExecStartPre=/usr/sbin/vdr-systemd_helper.sh --start-pre # this is where we get our parameters (still manageable # in the /etc/conf.d/vdr.* files EnvironmentFile=/var/vdr/tmp/systemd_env # start VDR with our desired parameters, please disable the # internal watchdog by setting the timeout to 0 ExecStart=/usr/bin/vdr $VDR_OPTS # execute addons/plugins scripts meant to be run afer starting ExecStartPost=/usr/sbin/vdr-systemd_helper.sh --start-post # execute addons/plugins scripts meant to be run before stopping ExecStop=/usr/sbin/vdr-systemd_helper.sh --stop-pre # execute final scripts ExecStopPost=/usr/sbin/vdr-systemd_helper.sh --stop-post Restart=always [Install] WantedBy=multi-user.target