]> git.ipfire.org Git - ipfire-2.x.git/blame - src/initscripts/init.d/vdr
Delayed the mISDN stuff to core 14.
[ipfire-2.x.git] / src / initscripts / init.d / vdr
CommitLineData
98248635
AF
1#!/bin/sh
2########################################################################
3# Begin $rc_base/init.d/vdr
4#
5# Description : This is a script that starts vdr as deamon
6#
7# Authors : Arne Fitzenreiter (arne@ipfire.org)
8#
9# Version : 01.00
10#
11# Notes :
12#
13########################################################################
14
15. /etc/sysconfig/rc
16. ${rc_functions}
17
18case "${1}" in
19 start)
20 boot_mesg "Starting Video Disk Recorder..."
2adf5286
AF
21 if [ "$(ps -A | grep runvdr)" != "" ]; then
22 boot_mesg "Error! Alrady run!"
23 echo_failure
24 exit 1;
25 fi
0f4001f8
AF
26 if [ ! -e /dev/dvb/adapter0/frontend0 ]; then
27 boot_mesg "Error! No DVB tuner found."
28 echo_failure
29 exit 1;
d9b16394 30 fi
42d62a83 31 loadproc screen -dmS vdr /opt/vdr/bin/runvdr
98248635
AF
32 ;;
33
34 stop)
35 boot_mesg "Stopping Video Disk Recorder..."
42d62a83 36 killall -s KILL -w runvdr
98248635
AF
37 killproc /opt/vdr/bin/vdr
38 ;;
39
40 restart)
41 ${0} stop
42 sleep 1
43 ${0} start
44 ;;
45
46 status)
42d62a83 47 statusproc /opt/vdr/bin/runvdr
98248635
AF
48 statusproc /opt/vdr/bin/vdr
49 ;;
50
51 *)
52 echo "Usage: ${0} {start|stop|restart|status}"
53 exit 1
54 ;;
55esac
56
57# End $rc_base/init.d/vdr