[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/bittorrent/devel bttrack.init,1.2,1.3



Author: pghmcfc

Update of /cvs/extras/rpms/bittorrent/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv31627

Modified Files:
	bttrack.init 
Log Message:
Improve backgrounding behaviour in initscripts



Index: bttrack.init
===================================================================
RCS file: /cvs/extras/rpms/bittorrent/devel/bttrack.init,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- bttrack.init	2 Jun 2005 11:57:13 -0000	1.2
+++ bttrack.init	2 Jun 2005 14:28:24 -0000	1.3
@@ -28,13 +28,14 @@
 prog="/usr/bin/bttrack.py"
 btuser="torrent"
 
-
 case "$1" in
   start)
 	echo -n $"Starting BitTorrent tracker: "
-	# still sub-optimal startup: does not detach properly from terminal
-	(runuser -s /bin/sh -c "$prog --port $PORT --dfile $STATEFILE --logfile $LOGFILE \
-		$OPTIONS --allowed_dir $DIR" $btuser &) && echo_success || echo_failure
+	runuser -s /bin/sh -c "$prog --port $PORT --dfile $STATEFILE --logfile $LOGFILE \
+		$OPTIONS --allowed_dir $DIR" $btuser &> /dev/null &
+	disown -ar
+	usleep 500000
+	status bttrack.py &> /dev/null && echo_success || echo_failure
 	RETVAL=$?
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/bttrack.py
 	echo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]