Runvdr - DVBModule/Plugins
Aus VDR Wiki
(Unterschied zwischen Versionen)
Hulk (Diskussion | Beiträge) K |
|||
(15 dazwischenliegende Versionen von 2 Benutzern werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | + | ==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 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 | ||
+ | |||
+ | [[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