]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blame - src/initscripts/init.d/vdr
script to start vdr with softdevice
[people/teissler/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
42d62a83 26 loadproc screen -dmS vdr /opt/vdr/bin/runvdr
98248635
AF
27 ;;
28
29 stop)
30 boot_mesg "Stopping Video Disk Recorder..."
42d62a83 31 killall -s KILL -w runvdr
98248635
AF
32 killproc /opt/vdr/bin/vdr
33 ;;
34
35 restart)
36 ${0} stop
37 sleep 1
38 ${0} start
39 ;;
40
41 status)
42d62a83 42 statusproc /opt/vdr/bin/runvdr
98248635
AF
43 statusproc /opt/vdr/bin/vdr
44 ;;
45
46 *)
47 echo "Usage: ${0} {start|stop|restart|status}"
48 exit 1
49 ;;
50esac
51
52# End $rc_base/init.d/vdr