mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-05-01 15:52:55 +02:00
44 lines
873 B
Bash
Executable File
44 lines
873 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# runvdr: Loads the DVB driver and runs VDR
|
|
#
|
|
# If VDR exits abnormally, the driver will be reloaded
|
|
# and VDR restarted.
|
|
#
|
|
# Any command line parameters will be passed on to the
|
|
# actual 'vdr' program.
|
|
#
|
|
|
|
PLUGOPTS="-Pstreamdev-server"
|
|
|
|
VDRPRG="./bin/vdr"
|
|
VDRCMD="$VDRPRG -w 60 -c /opt/vdr/etc $PLUGOPTS $*"
|
|
|
|
KILL="killall -q -TERM"
|
|
|
|
if [ "$(ps -A | grep " vdr")" != "" ]; then
|
|
echo vdr is already running!
|
|
exit 1
|
|
fi
|
|
|
|
mkdir -p /var/video
|
|
cd /opt/vdr
|
|
while (true) do
|
|
#
|
|
# If you have stability Problems at tuning or similar
|
|
# unload and reload the dvb-modules here ...
|
|
# Example is for Hauppauge Nexus 2.0
|
|
#
|
|
# rmmod dvb_ttpci
|
|
# rmmod stv0299
|
|
# rmmod dvb_core
|
|
# modprobe dvb_ttpci
|
|
#
|
|
sleep 1
|
|
eval "$VDRCMD"
|
|
if test $? -eq 0 -o $? -eq 2; then exit; fi
|
|
$KILL $VDRPRG
|
|
sleep 10
|
|
echo "`date` restarting VDR"
|
|
done
|