Runvdr - DVBModule/Plugins

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
 
Zeile 1: Zeile 1:
Test
+
#!/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

Version vom 26. Oktober 2006, 11:49 Uhr

  1. !/bin/sh
  1. runvdr: Loads the DVB driver and runs VDR
  2. If VDR exits abnormally, the driver will be reloaded
  3. and VDR restarted.
  4. In order to actually use this script you need to implement
  5. the functions DriverLoaded(), LoadDriver() and UnloadDriver()
  6. and maybe adjust the VDRPRG and VDRCMD to your particular
  7. requirements.
  8. Since this script loads the DVB driver, it must be started
  9. as user 'root'. Add the option "-u username" to run VDR
  10. under the given user name.
  11. Any command line parameters will be passed on to the
  12. actual 'vdr' program.
  13. See the main source file 'vdr.c' for copyright information and
  14. how to reach the author.
  15. $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"

  1. 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