Runvdr - DVBModule/Plugins

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
Zeile 12: Zeile 12:
 
  #
 
  #
 
  # Since this script loads the DVB driver, it must be started
 
  # Since this script loads the DVB driver, it must be started
  # as user 'root'. Add the option "-u username" to run VDR
+
# as user 'root'. Add the option "-u username" to run VDR
 
  # under the given user name.
 
  # under the given user name.
 
  #
 
  #
Zeile 47: Zeile 47:
 
         -P mp3 \
 
         -P mp3 \
 
         -P mplayer $*"
 
         -P mplayer $*"
 
+
 
  LSMOD="`/sbin/lsmod | grep -w 'dvb_core' | wc -l`"
 
  LSMOD="`/sbin/lsmod | grep -w 'dvb_core' | wc -l`"
 
  KILL="/usr/bin/killall -q -TERM"
 
  KILL="/usr/bin/killall -q -TERM"
 
+
 
  # Load driver if it hasn't been loaded already:
 
  # Load driver if it hasn't been loaded already:
 
  if [ $LSMOD -eq 0 ] ; then
 
  if [ $LSMOD -eq 0 ] ; then
Zeile 59: Zeile 59:
 
   (modprobe budget_ci)
 
   (modprobe budget_ci)
 
   fi
 
   fi
 
+
 
  while (true) do
 
  while (true) do
 
       $VDRCMD
 
       $VDRCMD

Version vom 26. Oktober 2006, 10:50 Uhr

#!/bin/sh

# runvdr: Loads the DVB driver and runs VDR
#
# If VDR exits abnormally, the driver will be reloaded
# and VDR restarted.
#
# In order to actually use this script you need to implement
# the functions DriverLoaded(), LoadDriver() and UnloadDriver()
# and maybe adjust the VDRPRG and VDRCMD to your particular
# requirements.
#
# Since this script loads the DVB driver, it must be started
# as user 'root'. Add the option "-u username" to run VDR
# under the given user name.
#
# Any command line parameters will be passed on to the
# actual 'vdr' program.
#
# See the main source file 'vdr.c' for copyright information and
# how to reach the author.
#
# $Id: runvdr 1.19 2006/05/14 16:02:05 kls Exp $

export LANG=de_DE.iso8859-1
export LC_CTYPE=de_DE.iso8859-1
PATH=$PATH:/usr/local/bin

VDRUSR=root
VDRPRG="/usr/local/src/VDR/vdr"
VDRCMD="$VDRPRG -w 60 \
       --vfat \
       --lirc \
       -t /dev/tty8 \
       -c /etc/vdr \
       -E /var/vdr \
       -L /usr/local/src/VDR/PLUGINS/lib \
       -s /usr/local/bin/vdrpoweroff.sh \
       -r "/usr/local/bin/noadcall.sh" \
       -P dvd \
       -P vcd \ 
       -P text2skin \
       -P tvonscreen \ 
       -P statusleds \ 
       -P director \
       -P femon \
       -P mp3 \
       -P mplayer $*"

LSMOD="`/sbin/lsmod | grep -w 'dvb_core' | wc -l`"
KILL="/usr/bin/killall -q -TERM"

# Load driver if it hasn't been loaded already:
if [ $LSMOD -eq 0 ] ; then
  (modprobe dvb_core)
  (modprobe dvb_ttpci)
  (modprobe budget_core)
  (modprobe budget)
  (modprobe budget_ci)
  fi

while (true) do
     $VDRCMD
     if test $? -eq 0 -o $? -eq 2; then exit; fi
     date
     echo "restarting VDR"
     $KILL $VDRPRG
     sleep 10
     (modprobe -r budget_ci)
     (modprobe -r budget)
     (modprobe -r budget_core)
     (modprobe -r dvb_ttpci)
     (modprobe -r dvb_core)
     (modprobe dvb_core)
     (modprobe dvb_ttpci)
     (modprobe budget_core)
     (modprobe budget)
     (modprobe budget_ci)
     date
     done