]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/vdr
script to start vdr with softdevice
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / vdr
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
18 case "${1}" in
19 start)
20 boot_mesg "Starting Video Disk Recorder..."
21 if [ "$(ps -A | grep runvdr)" != "" ]; then
22 boot_mesg "Error! Alrady run!"
23 echo_failure
24 exit 1;
25 fi
26 loadproc screen -dmS vdr /opt/vdr/bin/runvdr
27 ;;
28
29 stop)
30 boot_mesg "Stopping Video Disk Recorder..."
31 killall -s KILL -w runvdr
32 killproc /opt/vdr/bin/vdr
33 ;;
34
35 restart)
36 ${0} stop
37 sleep 1
38 ${0} start
39 ;;
40
41 status)
42 statusproc /opt/vdr/bin/runvdr
43 statusproc /opt/vdr/bin/vdr
44 ;;
45
46 *)
47 echo "Usage: ${0} {start|stop|restart|status}"
48 exit 1
49 ;;
50 esac
51
52 # End $rc_base/init.d/vdr