From: Sebastien Douheret Date: Sat, 13 May 2017 21:23:42 +0000 (+0200) Subject: Allow to not start server (useful for debugging). X-Git-Tag: v0.0.1-alpha~41 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;ds=sidebyside;h=200d49bc4aea2167ff292a885f90ee13c6231e59;p=src%2Fxds%2Fxds-server.git Allow to not start server (useful for debugging). Signed-off-by: Sebastien Douheret --- diff --git a/scripts/xds-start-server.sh b/scripts/xds-start-server.sh index 5a3cba7..6888473 100755 --- a/scripts/xds-start-server.sh +++ b/scripts/xds-start-server.sh @@ -41,10 +41,16 @@ pid_sync=$(jobs -p) echo "pid=${pid_sync}" echo "" -sleep 1 - -echo "### Start XDS server" -$BINDIR/xds-server --config $XDS_CONFFILE -log $LOGLEVEL > $LOG_XDS 2>&1 & -pid_xds=$(jobs -p) -echo "pid=${pid_xds}" +if [ "$1" == "-noserver" ]; then + echo "## XDS server NOT STARTED" + echo " Command to start it:" + echo " $BINDIR/xds-server --config $XDS_CONFFILE -log $LOGLEVEL > $LOG_XDS 2>&1" +else + # Wait a bit so make connection to Syncthing possible + sleep 1 + echo "### Start XDS server" + $BINDIR/xds-server --config $XDS_CONFFILE -log $LOGLEVEL > $LOG_XDS 2>&1 & + pid_xds=$(jobs -p) + echo "pid=${pid_xds}" +fi echo ""