vdr/vdr/debian vdr.init

Thomas Schmidt pkg-vdr-dvb-changes@lists.alioth.debian.org
Sat, 10 Jul 2004 18:39:45 +0000


Update of /cvsroot/pkg-vdr-dvb/vdr/vdr/debian
In directory haydn:/tmp/cvs-serv19398/vdr/vdr/debian

Modified Files:
	vdr.init 
Log Message:
should not anymore be possible to start vdr, if it is allready running

Index: vdr.init
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.init,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- vdr.init	3 Jun 2004 00:24:27 -0000	1.19
+++ vdr.init	10 Jul 2004 18:39:43 -0000	1.20
@@ -22,12 +22,18 @@
 
 startvdr() 
 {
-    getplugins
-    mergecommands "commands"
-    mergecommands "reccmds"
-    start-stop-daemon --start --quiet \
-	 --exec /usr/sbin/runvdr -- -v $VIDEO_DIR -c $CFG_DIR -r $REC_CMD \
-	 -s $SHUTDOWN_CMD $OPTIONS $PLUGINS &
+	 if `ps ax | grep "/usr/bin/vdr " | grep -v grep`
+	 then
+    	getplugins
+    	mergecommands "commands"
+    	mergecommands "reccmds"
+    	start-stop-daemon --start --quiet \
+	 	--exec /usr/sbin/runvdr -- -v $VIDEO_DIR -c $CFG_DIR -r $REC_CMD \
+	 	-s $SHUTDOWN_CMD $OPTIONS $PLUGINS &
+	else
+		echo -n " - seems to be running allready."
+		exit 1
+	fi
 } 
 
 stopvdr()