]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blame - config/vdr/bin/runvdr
Increased vdr nicelevel, add startlinks
[people/pmueller/ipfire-2.x.git] / config / vdr / bin / runvdr
CommitLineData
42d62a83
AF
1#!/bin/sh
2
3# runvdr: Loads the DVB driver and runs VDR
4#
5# If VDR exits abnormally, the driver will be reloaded
6# and VDR restarted.
7#
8# Any command line parameters will be passed on to the
9# actual 'vdr' program.
10#
11
2adf5286
AF
12PLUGOPTS="-Pstreamdev-server"
13
42d62a83 14VDRPRG="./bin/vdr"
0e07ae54 15VDRCMD="/bin/nice --11 $VDRPRG -w 60 -c /opt/vdr/etc $PLUGOPTS $*"
42d62a83
AF
16
17KILL="killall -q -TERM"
18
2adf5286
AF
19if [ "$(ps -A | grep " vdr")" != "" ]; then
20 echo vdr is already running!
21 exit 1
22fi
23
42d62a83
AF
24mkdir -p /var/video
25cd /opt/vdr
26while (true) do
27#
28# If you have stability Problems at tuning or similar
29# unload and reload the dvb-modules here ...
30# Example is for Hauppauge Nexus 2.0
31#
32# rmmod dvb_ttpci
33# rmmod stv0299
34# rmmod dvb_core
35# modprobe dvb_ttpci
36#
37 sleep 1
38 eval "$VDRCMD"
39 if test $? -eq 0 -o $? -eq 2; then exit; fi
40 $KILL $VDRPRG
41 sleep 10
42 echo "`date` restarting VDR"
43done