Very nice. :) I have always used this before:

// Startup code
nice -n 19 terrasync -p ${PORT} -s ${SOURCE} -d ${FG_HOME}/Scenery/ >
${FG_HOME}/terrasync.log & 2>&1
///////////////

// Stop code after usage
killall terrasync rsync
sleep 1
killall terrasync rsync
///////////////

On Mon, 2009-12-07 at 15:54 -0700, John Denker wrote:
> I patched terrasync to make it more usable, more like a proper daemon
>  -- writes pid to file
>  -- normally does not exit until signalled
>  -- uses blocking and non-blocking I/O as appropriate.
> 
> http://gitorious.org/~jsd/fg/sport-model/commits/sport
> 
> Usage example:
> 
> pid=$(cat $pidfile 2>/dev/null)
> if test -n "$pid" && kill -0 $pid ; then
>     echo "terrasync already running: $pid"
> else
>     nice /games/sport/fgs/utils/TerraSync/terrasync         \
>       -v -pid $pidfile -S -p 5500 -d /games/orig/terrasync &
> fi
> 
> 
> ------------------------------------------------------------------------------
> Return on Information:
> Google Enterprise Search pays you back
> Get the facts.
> http://p.sf.net/sfu/google-dev2dev
> _______________________________________________
> Flightgear-devel mailing list
> Flightgear-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Attachment: signature.asc
Description: This is a digitally signed message part

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to