Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: runlevelscript for vdr
quoting Steffen Barszus (st_barszus@gmx.de)
sent: Sun, May 18, 2003 at 11:45:41PM +0200
> Hi!
>
> Has somebody written a runlevelscript for vdr till now ? I want to start it as
> service and don't want to do work that is allready done or at least it would
> be nice to have something to build on. Any pointers ?
>
> Steffen
>
>
> --
> Info:
> To unsubscribe send a mail to ecartis@linuxtv.org with "unsubscribe vdr" as subject.
>
--
--- unix _is_ user-friendly ---
--- it just decides who his friends are ---
#!/bin/sh
#
# startup script for the 'video disc recorder' and its drivers
#
# description: video disc recorder dumps your dvb streams on disc
#
DAEMON="/opt/vdr-1.1.27/bin/vdr"
ARGS="--config=/opt/vdr-1.1.27/etc/ --epgfile=/mnt/tmpfs/epg.data --shutdown=/opt/scripts/system_shutdown --terminal=/dev/tty1 --video=/home/media/dvb/ --lib=/opt/vdr-1.1.27/plugins/ --plugin=mp3 --plugin=mplayer --plugin=vcd"
## modules of driver version 1.0.0-pre
MODULES="dvb-ttpci evdev ves1820 stv0299 grundig_29504-491 grundig_29504-401 alps_tdlb7 alps_tdmb7 alps_bsrv2 dvb-core videodev"
test -f $DAEMON || exit 0
case "$1" in
start)
echo "loading 'digital video broadcast driver'"
make -C /opt/dvb-2003_04_13/driver insmod 2>&1 > /dev/null
chown -R root:media /dev/dvb/
chmod 750 /dev/dvb/adapter?/
chmod 660 /dev/dvb/adapter?/*
echo "."
echo -n "starting 'video disc recorder' daemon: vdr"
su - media -- $DAEMON $ARGS
echo "."
## give vdr time to fork, so that its pids are in a nicer sequence
sleep 1
;;
stop)
echo "stopping 'video disc recorder' daemon: vdr"
killall -TERM vdr
## give vdr time to finish
sleep 2
## if vdr has crashed kill him
killall -KILL vdr
echo "."
echo "deloading 'digital video broadcast driver'"
modprobe -r $MODULES
rm -rf /dev/ost
rm -rf /dev/ost
echo "."
;;
restart|force-reload)
echo "stopping 'video disc recorder' daemon: vdr"
killall -TERM vdr
## give vdr time to finish
sleep 2
## if vdr has crashed kill him
killall -KILL vdr
echo "."
echo "deloading 'digital video broadcast driver'"
modprobe -r $MODULES
rm -rf /dev/ost
rm -rf /dev/ost
echo "."
echo "loading 'digital video broadcast driver'"
make -C /opt/dvb-2003_04_13/driver insmod 2>&1 > /dev/null
chown -R root:media /dev/dvb/
chmod 750 /dev/dvb/adapter?/
chmod 660 /dev/dvb/adapter?/*
echo "."
echo -n "starting 'video disc recorder' daemon: vdr"
su - media -- $DAEMON $ARGS
echo "."
## give vdr time to fork, so that its pids are in a nicer sequence
sleep 1
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
Home |
Main Index |
Thread Index