Runvdr - DVBModule/Plugins

Aus VDR Wiki
(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
K
 
(14 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
#!/bin/sh
+
==Vorbemerkung==
 +
Das hier aufgeführte "runvdr" Skript habe ich bei mir in Verwendung. Unter umständen muss das Skript an euren VDR noch angepasst werden.
  
# runvdr: Loads the DVB driver and runs VDR
+
==runvdr Skript==
#
+
Das "runvdr" Skript ist unter folgendem Pfad zu finden:
# If VDR exits abnormally, the driver will be reloaded
+
cd /usr/local/bin
# and VDR restarted.
+
vi runvdr
#
+
# 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
+
#!/bin/sh
export LC_CTYPE=de_DE.iso8859-1
+
PATH=$PATH:/usr/local/bin
+
# runvdr: Loads the DVB driver and runs VDR
 
+
#
VDRUSR=root
+
  # If VDR exits abnormally, the driver will be reloaded
VDRPRG="/usr/local/src/VDR/vdr"
+
# and VDR restarted.
VDRCMD="$VDRPRG -w 60 \
+
#
 +
# 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 \
 
         --vfat \
 
         --lirc \
 
         --lirc \
Zeile 36: Zeile 44:
 
         -E /var/vdr \
 
         -E /var/vdr \
 
         -L /usr/local/src/VDR/PLUGINS/lib \
 
         -L /usr/local/src/VDR/PLUGINS/lib \
        -s /usr/local/bin/vdrpoweroff.sh \
+
         -P femon $*"
        -r "/usr/local/bin/noadcall.sh" \
+
        -P dvd \
+
LSMOD="`/sbin/lsmod | grep -w 'dvb_core' | wc -l`"
        -P vcd \
+
KILL="/usr/bin/killall -q -TERM"
        -P text2skin \
+
        -P tvonscreen \
+
# Load driver if it hasn't been loaded already:
        -P statusleds \
+
if [ $LSMOD -eq 0 ] ; then
        -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_core)
 
   (modprobe dvb_ttpci)
 
   (modprobe dvb_ttpci)
Zeile 59: Zeile 57:
 
   (modprobe budget_ci)
 
   (modprobe budget_ci)
 
   fi
 
   fi
 
+
while (true) do
+
while (true) do
 
       $VDRCMD
 
       $VDRCMD
 
       if test $? -eq 0 -o $? -eq 2; then exit; fi
 
       if test $? -eq 0 -o $? -eq 2; then exit; fi
Zeile 79: Zeile 77:
 
       date
 
       date
 
       done
 
       done
 +
 +
[[Kategorie:Skripte]]

Aktuelle Version vom 1. Dezember 2009, 22:11 Uhr

[Bearbeiten] Vorbemerkung

Das hier aufgeführte "runvdr" Skript habe ich bei mir in Verwendung. Unter umständen muss das Skript an euren VDR noch angepasst werden.

[Bearbeiten] runvdr Skript

Das "runvdr" Skript ist unter folgendem Pfad zu finden:

cd /usr/local/bin
vi runvdr
#!/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 \
       -P femon $*"

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