summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorM0Rf302015-06-17 16:37:57 +0200
committerM0Rf302015-06-17 16:37:57 +0200
commit6d1fad3091bdd0c5eb7553d54b19fb389653b588 (patch)
tree1eed891726e22b9dc732c47937e6fb86b8bb87dd
downloadaur-6d1fad3091bdd0c5eb7553d54b19fb389653b588.tar.gz
Initial import
-rw-r--r--.SRCINFO51
-rwxr-xr-x51-vdr.rules12
-rwxr-xr-xMake.config48
-rwxr-xr-xPKGBUILD125
-rwxr-xr-xvdr-check-setup.sh10
-rwxr-xr-xvdr-config.sh14
-rwxr-xr-xvdr-devel.install55
-rwxr-xr-xvdr-moveto.sh32
-rwxr-xr-xvdr-runvdr.sh125
-rwxr-xr-xvdr-shutdown.sh7
-rwxr-xr-xvdr.conf70
-rwxr-xr-xvdr.service15
-rwxr-xr-xvdr.sudoers4
-rwxr-xr-xvdr.tmpfiles1
14 files changed, 569 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..65b7b764fac4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,51 @@
+pkgbase = vdr-devel
+ pkgdesc = The video disk recorder (VDR)
+ pkgver = 2.1.6
+ pkgrel = 1
+ url = ftp://ftp.tvdr.de/vdr/Developer/
+ install = vdr-devel.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = linux-api-headers
+ depends = fontconfig
+ depends = gettext
+ depends = libjpeg
+ depends = perl
+ optdepends = lirc: To use a remote control
+ optdepends = runvdr-extreme: An alternative runvdr script
+ optdepends = vdrsymbols-ttf: Symbols that some VDR plugins and patches use
+ conflicts = vdr
+ options = !emptydirs
+ backup = etc/vdr/channels.conf
+ backup = etc/vdr/diseqc.conf
+ backup = etc/vdr/keymacros.conf
+ backup = etc/vdr/sources.conf
+ backup = etc/vdr/svdrphosts.conf
+ source = ftp://ftp.tvdr.de/vdr/Developer/vdr-2.1.6.tar.bz2
+ source = Make.config
+ source = vdr.conf
+ source = vdr.service
+ source = vdr-shutdown.sh
+ source = vdr-check-setup.sh
+ source = vdr-config.sh
+ source = vdr-moveto.sh
+ source = vdr.tmpfiles
+ source = vdr.sudoers
+ source = vdr-runvdr.sh
+ source = 51-vdr.rules
+ md5sums = 79519dac59166fabc2029b916bd61d00
+ md5sums = b2daabab143f879e8fb02f939d942202
+ md5sums = 729bd6dffe7493f30b70f1a76ba8da43
+ md5sums = b216bcc3c7f44f9d47284a2df54f62a4
+ md5sums = d96642acceb658209d7a4d3867a9dab4
+ md5sums = 7cc69205b789906a59563fe94bd03db7
+ md5sums = 39ea8344b770a9f9fba7b71f1e2640da
+ md5sums = 01b49f61a78690e8894ab662e84d6f2f
+ md5sums = 3b19cfb57d7632246798f115bf60b4cb
+ md5sums = a05c9ef5d30e33d5ea5bee43c72eac31
+ md5sums = e867e399822ca441e60c8daa7867ba11
+ md5sums = cb8ce90f5602fa99e13f72be57ad0954
+
+pkgname = vdr-devel
+
diff --git a/51-vdr.rules b/51-vdr.rules
new file mode 100755
index 000000000000..ec8954c1d0e0
--- /dev/null
+++ b/51-vdr.rules
@@ -0,0 +1,12 @@
+# VDR friendly udev rules for DVB and other devices.
+
+# See also *-vdr-remote.rules if using the remote plugin.
+
+# See also /etc/security/console.perms.d/*-vdr.perms and
+# https://bugzilla.redhat.com/202132
+
+# DVB devices
+KERNEL=="dvb*", GROUP="video", MODE="0660"
+
+# Remote controller, serial port 1 (eg. vdr --rcu=/dev/ttyS0):
+#KERNEL=="ttyS0", GROUP="video", MODE="0660"
diff --git a/Make.config b/Make.config
new file mode 100755
index 000000000000..ae73bb00f6dd
--- /dev/null
+++ b/Make.config
@@ -0,0 +1,48 @@
+#
+# User defined Makefile options for the Video Disk Recorder
+#
+# Copy this file to 'Make.config' and change the parameters as necessary.
+#
+# See the main source file 'vdr.c' for copyright information and
+# how to reach the author.
+#
+# $Id: Make.config.template 1.16 2008/01/13 12:54:09 kls Exp $
+
+### The C compiler and options:
+
+CC = gcc
+CFLAGS = -g -O2 -Wall
+
+CXX = g++
+CXXFLAGS = -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses
+
+ifdef PLUGIN
+CFLAGS += -fPIC
+CXXFLAGS += -fPIC
+endif
+
+### The directory environment:
+
+#DVBDIR = /usr/src/v4l-dvb/linux
+MANDIR = /usr/share/man
+BINDIR = /usr/sbin
+
+LOCDIR = /usr/share/locale
+PLUGINDIR = ./PLUGINS
+PLUGINLIBDIR = /usr/lib/vdr
+VIDEODIR = /var/spool/video
+CONFDIR = /etc/vdr
+
+### The remote control:
+# NB. From lirc 0.8.6 on the lirc socket is no longer /dev/lirc
+LIRC_DEVICE = /var/run/lirc/lircd
+RCU_DEVICE = /dev/ttyS1
+
+## Define if you want vdr to not run as root
+VDR_USER = vdr
+
+### You don't need to touch the following:
+
+ifdef DVBDIR
+INCLUDES += -I$(DVBDIR)/include
+endif
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 000000000000..40c8839df8dd
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,125 @@
+# Maintainer: M0Rf30
+
+pkgname=vdr-devel
+pkgver=2.1.6
+pkgrel=1
+arch=('i686' 'x86_64')
+pkgdesc="The video disk recorder (VDR)"
+url="ftp://ftp.tvdr.de/vdr/Developer/"
+license=('GPL2')
+depends=('fontconfig' 'gettext' 'libjpeg' 'perl')
+conflicts=('vdr')
+makedepends=('linux-api-headers')
+optdepends=('lirc: To use a remote control'
+ 'runvdr-extreme: An alternative runvdr script'
+ 'vdrsymbols-ttf: Symbols that some VDR plugins and patches use')
+backup=('etc/vdr/channels.conf'
+ 'etc/vdr/diseqc.conf'
+ 'etc/vdr/keymacros.conf'
+ 'etc/vdr/sources.conf'
+ 'etc/vdr/svdrphosts.conf')
+options=(!emptydirs)
+install="${pkgname}.install"
+source=(ftp://ftp.tvdr.de/vdr/Developer/vdr-${pkgver}.tar.bz2
+ Make.config
+ vdr.conf
+ vdr.service
+ vdr-shutdown.sh
+ vdr-check-setup.sh
+ vdr-config.sh
+ vdr-moveto.sh
+ vdr.tmpfiles
+ vdr.sudoers
+ vdr-runvdr.sh
+ 51-vdr.rules)
+
+build() {
+ cd $srcdir/vdr-$pkgver
+
+# Patches
+msg2 "Disable some graphs that end up too big to be useful"
+ for g in COLLABORATION INCLUDE INCLUDED_BY ; do
+ sed -i -e 's/^\(\s*'$g'_GRAPH\s*=\s*\).*/\1NO/' Doxyfile
+ done
+
+msg2 "Update lirc socket location in man page"
+ sed -i "s|/dev/lircd|/var/run/lirc/lircd|g" vdr.1
+
+msg2 "Don't install runvdr"
+ sed -i "s|runvdr ||g" Makefile
+
+ # VDR directory environment (Make.config):
+ # MANDIR = /usr/share/man
+ # BINDIR = /usr/bin
+ # LOCDIR = /usr/share/locale
+ # PLUGINLIBDIR = /usr/lib/vdr
+ # VIDEODIR = /var/spool/video
+ # CONFDIR = /etc/vdr
+ # Also:
+ # VDR_USER = vdr
+
+ cp ../Make.config Make.config
+msg2 "Buildin..."
+ #unset PREFIX
+ make PREFIX=/usr
+}
+
+package(){
+ cd $srcdir/vdr-$pkgver
+ make DESTDIR="$pkgdir" PREFIX=/usr install
+
+ install -d -m755 $pkgdir/usr/bin
+ install -d -m755 $pkgdir/usr/include/vdr/include
+ install -d -m755 $pkgdir/usr/include/vdr/libsi
+ install -d -m755 $pkgdir/usr/share/doc/vdr
+ install -d -m755 $pkgdir/etc/vdr/vdr-plugins.d
+
+msg2 "Install utility scripts"
+ install -m755 ../vdr-check-setup.sh $pkgdir/usr/bin/vdr-check-setup
+ install -m755 ../vdr-config.sh $pkgdir/usr/bin/vdr-config
+ install -m755 ../vdr-moveto.sh $pkgdir/usr/bin/vdr-moveto
+ chmod +x $pkgdir/usr/bin/*
+ install -m755 epg2html $pkgdir/usr/bin/epg2html
+
+msg2 "Install Make.config and vdr header files"
+ install -m644 Make.config $pkgdir/usr/include/vdr
+ install -m644 *.h $pkgdir/usr/include/vdr
+ install -m644 libsi/*.h $pkgdir/usr/include/vdr/libsi
+ ln -sf .. $pkgdir/usr/include/vdr/include/vdr
+ ln -sf ../libsi $pkgdir/usr/include/vdr/include/libsi
+
+msg2 "Install udev rules"
+ mkdir -p $pkgdir/usr/lib/udev/rules.d/
+ cp $srcdir/51-vdr.rules $pkgdir/usr/lib/udev/rules.d/51-vdr.rules
+ chmod a+r $pkgdir/usr/lib/udev/rules.d/51-vdr.rules
+
+msg2 "Init services file"
+ install -D -m644 ../vdr.conf $pkgdir/etc/vdr/vdr
+ install -D -m644 ../vdr.service $pkgdir/usr/lib/systemd/system/vdr.service
+ install -D -m644 ../vdr.tmpfiles $pkgdir/usr/lib/tmpfiles.d/vdr.conf
+ install -m644 ../vdr-runvdr.sh $pkgdir/usr/sbin/runvdr
+ chmod +x $pkgdir/usr/sbin/runvdr
+
+msg2 "Sudoers file"
+ install -D -m755 ../vdr.sudoers $pkgdir/etc/sudoers.d/vdr
+msg2 "Vdr-shutdown.sh"
+ install -m755 $srcdir/vdr-shutdown.sh $pkgdir/usr/bin/vdr-shutdown.sh
+
+msg2 "Install documents"
+ for _document in channels.conf* *.template CONTRIBUTORS HISTORY INSTALL MANUAL PLUGINS.html README* UPDATE*; do
+ install -m644 ${_document} $pkgdir/usr/share/doc/vdr
+ done
+}
+
+md5sums=('79519dac59166fabc2029b916bd61d00'
+ 'b2daabab143f879e8fb02f939d942202'
+ '729bd6dffe7493f30b70f1a76ba8da43'
+ 'b216bcc3c7f44f9d47284a2df54f62a4'
+ 'd96642acceb658209d7a4d3867a9dab4'
+ '7cc69205b789906a59563fe94bd03db7'
+ '39ea8344b770a9f9fba7b71f1e2640da'
+ '01b49f61a78690e8894ab662e84d6f2f'
+ '3b19cfb57d7632246798f115bf60b4cb'
+ 'a05c9ef5d30e33d5ea5bee43c72eac31'
+ 'e867e399822ca441e60c8daa7867ba11'
+ 'cb8ce90f5602fa99e13f72be57ad0954')
diff --git a/vdr-check-setup.sh b/vdr-check-setup.sh
new file mode 100755
index 000000000000..607b73291ead
--- /dev/null
+++ b/vdr-check-setup.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cfg=/etc/vdr/channels.conf
+if [ ! -s $cfg ] ; then
+ logger -s -p daemon.err -t vdr.service \
+ "$cfg is not valid, use \"scandvb -o vdr\" from the dvb-apps package to create one."
+ exit 6
+else
+ chown vdr:vdr $cfg && chmod 644 $cfg
+fi
diff --git a/vdr-config.sh b/vdr-config.sh
new file mode 100755
index 000000000000..ef7be3ba7f5d
--- /dev/null
+++ b/vdr-config.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+case "$1" in
+ --version)
+ pkg-config vdr --modversion
+ ;;
+ --*dir|--apiversion|--user|--group)
+ pkg-config vdr --variable=${1#--}
+ ;;
+ *)
+ echo "Error: unknown option '$1'." >&2
+ exit 1
+ ;;
+esac
diff --git a/vdr-devel.install b/vdr-devel.install
new file mode 100755
index 000000000000..9ff74353fb0b
--- /dev/null
+++ b/vdr-devel.install
@@ -0,0 +1,55 @@
+# vdr.install
+
+# VDR directory environment
+VDR_USER=vdr
+CONFDIR=/etc/vdr
+VIDEODIR=/var/spool/video
+EPGDIR=/var/spool/epg
+
+## arg 1: the new package version
+post_install() {
+ echo ""
+ echo "********************************************************************"
+ echo " Configuration files are installed in ${CONFDIR} and should be"
+ echo ' owned by "'${VDR_USER}':'${VDR_USER}'"'
+ echo ""
+ echo " NOTE: The template runvdr script that comes with the vdr source"
+ echo " is installed in /usr/share/doc/vdr, NOT in /usr/bin. To make a"
+ echo " fully working installation either copy the template to /usr/bin,"
+ echo " edit it as necessary and then make it executable or use one of"
+ echo " the alternative runvdr scripts that can be found by searching"
+ echo " the Internet, e.g. runvdr-extreme."
+ echo "********************************************************************"
+ echo ""
+ if ! getent passwd ${VDR_USER} >/dev/null; then
+ echo -n 'Creating VDR user "'${VDR_USER}'"...'
+ [ ! -e ${VIDEODIR} ] && mkdir -p ${VIDEODIR}
+ [ ! -e ${EPGDIR} ] && mkdir -p ${EPGDIR}
+ usr/sbin/groupadd -g 199 ${VDR_USER} >/dev/null
+ /usr/sbin/useradd -r -d ${VIDEODIR} -g ${VDR_USER} -G video -s /bin/false -c "Video Disk Recorder" ${VDR_USER} &>/dev/null
+ passwd -l ${VDR_USER} &>/dev/null
+ chown -R ${VDR_USER}:${VDR_USER} ${CONFDIR}
+ chown ${VDR_USER}:${VDR_USER} ${VIDEODIR}
+ chown ${VDR_USER}:${VDR_USER} ${EPGDIR}
+ echo "done."
+ echo ""
+ else
+ echo 'VDR user "'${VDR_USER}'" already exists. Check that:'
+ echo '1. "'${CONFDIR}'" and vdr configuration files are owned by "'${VDR_USER}':'${VDR_USER}'"'
+ echo '2. "'${VIDEODIR}'" exists and is owned by "'${VDR_USER}':'${VDR_USER}'"'
+ echo '3. "'${EPGDIR}'" exists and is owned by "'${VDR_USER}':'${VDR_USER}'"'
+ echo ""
+ fi
+}
+
+## arg 1: the new package version
+## arg 2: the old package version
+post_upgrade() {
+ post_install $1
+}
+
+# arg 1: the old package version
+post_remove() {
+ echo 'VDR user "'${VDR_USER}'", "'${EPGDIR}'" and "'${VIDEODIR}'" will not be deleted.'
+}
+
diff --git a/vdr-moveto.sh b/vdr-moveto.sh
new file mode 100755
index 000000000000..cd35aa1872de
--- /dev/null
+++ b/vdr-moveto.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+# vdr-moveto.sh -- simple script for moving recordings to folders
+# Ville Skyttä 2007, Public Domain
+#
+# The preferred way to use this script is through VDR's recording commands
+# menu. To do that, add entries eg. like these to /etc/vdr/reccmds.conf:
+#
+# Move to movies: vdr-moveto.sh 00_Movies
+# Move to music: vdr-moveto.sh 00_Music
+
+videodir="$(sed -ne 's/^\s*VDR_OPTIONS\s*=.*\(-v\s\+\|--video\(=\|\s\+\)\)\([^[:space:])]*\).*/\3/p' /etc/vdr/vdr)"
+[ -n "$videodir" ] || videodir="/var/lib/vdr/video"
+
+to="$videodir/$1"
+what="$2"
+if [ -z "$what" ] ; then
+ echo "Usage: $0 TO-DIR WHAT"
+ exit 1
+fi
+
+mkdir -p "$to"
+dir="$(dirname $what)"
+todir="$to/$(basename $dir)"
+if [ -d "$todir" ] ; then
+ mv -v "$what" "$todir"
+ rmdir -v "$dir"
+else
+ mv -v "$dir" "$to"
+fi
+
+touch "$videodir/.update"
diff --git a/vdr-runvdr.sh b/vdr-runvdr.sh
new file mode 100755
index 000000000000..7d3e066fc1ec
--- /dev/null
+++ b/vdr-runvdr.sh
@@ -0,0 +1,125 @@
+#!/bin/bash
+
+# runvdr - VDR launcher
+#
+# runvdr [VDROPTION]...
+
+shopt -s extglob nocasematch nullglob
+
+VDR=/usr/sbin/vdr
+PLUGINDIR=/usr/lib/vdr
+PLUGINVER=VDR_PLUGIN_VERSION
+PLUGINSUF=${PLUGINVER:+.$PLUGINVER}
+
+log()
+{
+ type -P logger &>/dev/null && \
+ logger -s -p daemon.info -t ${0##*/} "$1" 2>&1 || echo "INFO: $1"
+}
+
+plugconf()
+{
+ local plugin=$1 PLUGIN_OPTIONS= PLUGIN_ENABLED=
+ if [[ -e /etc/vdr/vdr-plugins.d/$plugin.conf ]] ; then
+ . /etc/vdr/vdr-plugins.d/$plugin.conf
+ case $PLUGIN_ENABLED in no|false|0) return ;; esac
+ fi
+ if [[ $PLUGIN_OPTIONS ]] ; then
+ VDR_OPTIONS+=( --plugin="$plugin $PLUGIN_OPTIONS" )
+ else
+ VDR_OPTIONS+=( --plugin=$plugin )
+ fi
+}
+
+build_cmdline()
+{
+ local plugin= p=
+ # Add "priority" plugins.
+ for plugin in $VDR_PLUGIN_ORDER ; do
+ [[ -e $PLUGINDIR/libvdr-${plugin}.so$PLUGINSUF ]] && plugconf $plugin
+ done
+ # Add the rest available.
+ for plugin in $PLUGINDIR/libvdr-*.so$PLUGINSUF ; do
+ plugin=${plugin##*/libvdr-}
+ plugin=${plugin%.so$PLUGINSUF}
+ for p in $VDR_PLUGIN_ORDER ; do
+ if [[ $plugin == $p ]] ; then
+ # Already added.
+ continue 2
+ fi
+ done
+ plugconf $plugin
+ done
+}
+
+reload_dvb()
+{
+ local modules=$( /sbin/lsmod | \
+ awk '/^dvb_core/ { gsub(","," ",$4) ; print $4 }' )
+ if [[ $modules ]] ; then
+ log "Reloading DVB modules"
+ /sbin/modprobe -r $modules dvb_core
+ for module in $modules ; do
+ /sbin/modprobe $module
+ done
+ fi
+}
+
+set_rtcwake()
+{
+ # Check timestamp set by shutdown script.
+ local nexttimer=$( cat /var/run/vdr/next-timer 2>/dev/null )
+ rm -f /var/run/vdr/next-timer
+
+ if [[ $nexttimer != +([0-9]) ]] ; then
+ # Next timer timestamp not set by shutdown script or bogus,
+ # try to get it via SVDRP.
+ nexttimer=$( svdrpsend NEXT abs 2>/dev/null | \
+ sed -rne 's/^250[[:space:]]+[0-9]+[[:space:]]+([0-9]+).*/\1/p' )
+ fi
+
+ if [[ $nexttimer && $nexttimer -gt $( date +%s ) ]] ; then
+ [[ -f /etc/vdr/vdr ]] && . /etc/vdr/vdr
+ local when=$(( $nexttimer - ${WAKEUP_BEFORE_RECORDING:-10} * 60 ))
+ local hrwhen=$( date -d "1970-01-01 $when sec UTC" )
+ log "Setting wakeup time for next recording: $hrwhen"
+ /usr/sbin/rtcwake -m no -t $when >/dev/null
+ fi
+}
+
+if [[ $1 == --set-wakeup ]] ; then
+ # Just set RTC wakeup for next timer event.
+ set_rtcwake
+ exit $?
+fi
+
+rc=
+while true ; do
+
+ VDR_OPTIONS=()
+ if [[ $VDR_INIT ]] ; then
+ [[ -f /etc/vdr/vdr ]] && . /etc/vdr/vdr
+ [[ $DAEMON_COREFILE_LIMIT ]] && \
+ ulimit -S -c $DAEMON_COREFILE_LIMIT &>/dev/null && \
+ VDR_OPTIONS+=( --userdump ) && cd ${TMPDIR:-/tmp}
+ build_cmdline
+ fi
+
+ $VDR "$@" "${VDR_OPTIONS[@]}"
+ rc=$?
+
+ # 137: "kill -KILL" eg in killproc(), others: "man vdr"
+ case $rc in
+ 0|2|137)
+ log "VDR exited with status $rc, exiting"
+ break
+ ;;
+ *)
+ log "VDR exited with status $rc, attempting restart"
+ case $RELOAD_DVB in yes|true|1) reload_dvb ;; esac
+ ;;
+ esac
+
+done
+
+exit $rc
diff --git a/vdr-shutdown.sh b/vdr-shutdown.sh
new file mode 100755
index 000000000000..e628b212735f
--- /dev/null
+++ b/vdr-shutdown.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# To enable this script, pass it to vdr with the -s option, eg.
+# "-s vdr-shutdown.sh" (sans quotes) in VDR_OPTIONS in /etc/sysconfig/vdr.
+
+echo ${1:-0} > /var/run/vdr/next-timer
+exec sudo /sbin/shutdown -P now
diff --git a/vdr.conf b/vdr.conf
new file mode 100755
index 000000000000..ce1534db42dc
--- /dev/null
+++ b/vdr.conf
@@ -0,0 +1,70 @@
+# System configuration for VDR -*- sh -*-
+
+# The "master" options. Some examples of options you may want to set
+# here are -r, -t, and --rcu. See the vdr(1) man page for more info.
+#
+# The default shutdown script (/usr/lib*/vdr/bin/vdr-shutdown.sh) needs
+# sudo(8) configuration to work as expected, see the script source for
+# details.
+#
+VDR_OPTIONS=(--lirc --vfat --shutdown=vdr-shutdown.sh)
+
+# VDR_PLUGIN_ORDER is a space separated list of plugins that should be
+# loaded in a specific order. This affects eg. the order the plugins'
+# menu entries are displayed OSD menus by default. The plugins in this
+# list don't need to be installed, but if they are, they will be loaded
+# before other possibly installed plugins. Note that it is recommended
+# to load output plugins before others so that all necessary features are
+# present when needed by other plugins at startup/shutdown.
+#
+VDR_PLUGIN_ORDER="
+dxr3
+softdevice
+softhddevice
+streamdev-client
+xine
+xineliboutput
+dvbhddevice
+dvbsddevice
+tvonscreen
+osdteletext
+ttxtsubs
+osdpip
+femon
+recstatus
+markad
+sudoku
+weather
+weatherng
+dvd
+externalplayer
+mplayer
+mp3
+muggle
+burn
+"
+
+# I18N settings.
+#
+. /etc/vdr/i18n 2>/dev/null || :
+# LC_TIME affects how dates and times are displayed.
+#export LC_TIME=fi_FI.UTF-8
+
+# PATH where to find the internally used executables.
+#
+#PATH="$PATH:/opt/bin"
+
+# How many minutes before a recording should the VDR box wake up?
+# Some CI/CAM combinations can take quite a long time to initialize, so
+# we default to a pretty generous value here.
+#
+WAKEUP_BEFORE_RECORDING=10
+
+# Try reloading DVB modules on unexpected exits?
+#
+#RELOAD_DVB=yes
+
+# For debugging: allow vdr to dump core. Note that depending on the operating
+# environment, core dumps from setuid processes may be a security issue.
+#
+#DAEMON_COREFILE_LIMIT="unlimited"
diff --git a/vdr.service b/vdr.service
new file mode 100755
index 000000000000..eb067123745d
--- /dev/null
+++ b/vdr.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Video Disk Recorder
+Documentation=man:vdr(1)
+Documentation=file:///usr/share/doc/vdr/INSTALL
+After=syslog.target network.target lirc.service
+
+[Service]
+Environment=VDR_INIT=1
+ExecStartPre=/usr/bin/vdr-check-setup
+ExecStart=/usr/sbin/runvdr
+ExecStop=-/usr/sbin/runvdr --set-wakeup
+StandardOutput=null
+
+[Install]
+WantedBy=multi-user.target
diff --git a/vdr.sudoers b/vdr.sudoers
new file mode 100755
index 000000000000..3c17977a620e
--- /dev/null
+++ b/vdr.sudoers
@@ -0,0 +1,4 @@
+# Allow vdr to shut down the system, see vdr-shutdown.sh.
+
+Defaults:vdr !requiretty
+vdr ALL = (root) NOPASSWD: /sbin/shutdown
diff --git a/vdr.tmpfiles b/vdr.tmpfiles
new file mode 100755
index 000000000000..b474064de3fe
--- /dev/null
+++ b/vdr.tmpfiles
@@ -0,0 +1 @@
+D /var/run/vdr 0755 vdr root -