Advertisement
Guest User

Untitled

a guest
May 7th, 2014
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.30 KB | None | 0 0
  1. #!/bin/bash
  2. export LANG=de_DE.utf8
  3. export LC_COLLATE=de_DE.utf8
  4. export VDR_CHARSET_OVERRIDE=ISO-8859-9
  5.  
  6. PATH=/usr/local/bin:$PATH
  7.  
  8. VDRPRG="/usr/local/bin/vdr"
  9. #/usr/local/bin/vdr -D 0 -c ....
  10.  
  11. VDRCMD="$VDRPRG -c /etc/vdr -E /etc/vdr/epg.data \
  12.        -P eepg \
  13.        -P epgsearch \
  14.        -P'streamdev-server -a vdr:ichbineinpasswort -r /etc/vdr/plugins/streamdev-server/externremux.sh' \
  15.        -P xvdr \
  16.        -P vnsiserver5 \
  17.        -P 'restfulapi --channellogos=/usr/share/vdr-channellogos --epgimages=/var/cache/vdr/epgimages'  \
  18.        -P vdrmanager \
  19.        -u root \
  20.        $*"
  21.  
  22. KILL="/usr/bin/killall -q -TERM"
  23. # Detect whether the DVB driver is already loaded
  24. # and return 0 if it *is* loaded, 1 if not:
  25. DriverLoaded()
  26. {
  27.   return 1
  28. }
  29.  
  30. # Load all DVB driver modules needed for your hardware:
  31. LoadDriver ()
  32. {
  33.  
  34.   return 0
  35.  
  36. }
  37.  
  38. # Unload all DVB driver modules loaded in LoadDriver():
  39. UnloadDriver ()
  40. {
  41.  
  42.   return 0
  43.  
  44. }
  45.  
  46. # Load driver if it hasn't been loaded already:
  47. if ! DriverLoaded; then
  48.    LoadDriver
  49.    fi
  50.  
  51. while (true) do
  52.       eval "$VDRCMD"
  53.       if test $? -eq 0 -o $? -eq 2; then exit; fi
  54.       echo "`date` reloading DVB driver"
  55.       $KILL $VDRPRG
  56.       sleep 10
  57.       UnloadDriver
  58.       LoadDriver
  59.       echo "`date` restarting VDR"
  60.       done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement