Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] stubborn runvdr script wanted
Hi,
I'm looking for a runvdr script that will always reload the driver
and restart vdr whenever vdr exits normally or anormally.
The script I'm using now just terminates when vdr makes an emergency
exit (while trying to record on a channel that is (temporarily)
unavailable).
My script will terminate in this case with the message: I/O possible.
When i copy the same commands to the commandline and execute them
they don't crash and restart vdr instead.
my script:
------------------------------------------------
#!/bin/sh
DVBDIR="../DVB/driver"
VDRPRG="vdr"
VDRCMD="/usr/src/VDR/$VDRPRG -w 60 $*"
LSMOD="`/sbin/lsmod | grep -w '^dvb' | wc -l`"
KILLPROC="/usr/bin/killall -TERM"
# Load driver if it hasn't been loaded already:
if [ $LSMOD -eq 0 ] ; then
(cd $DVBDIR; make insmod)
fi
while (true) do
su -c "$VDRCMD" $VDRUSR
date
echo "restarting VDR"
$KILLPROC $VDRPRG
sleep 10
(cd $DVBDIR; make rmmod; make insmod)
date
done
---------------------------------------------
as you can see it's almost identical to the one
distributed by klaus.
I just omitted the exit when vdr doesn't behave well
(I'm not home during the week and i don't want to
loose all recordings).
And i adjusted for the use of killall.
Gruss Robert
--
---------------------------------------------------------------------------
Robert R. Simons robert.simons@vis.ethz.ch
VIS - Verein der Informatikstudierenden RZ F17.1
Information 27212
---------------------------------------------------------------------------
Home |
Main Index |
Thread Index