aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-13 23:23:42 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-05-13 23:23:52 +0200
commit200d49bc4aea2167ff292a885f90ee13c6231e59 (patch)
treea32e39543f287227b45946445a6806224e2d044f
parent87f390b37d51a4c8777d27836389e86e78c690d1 (diff)
Allow to not start server (useful for debugging).
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rwxr-xr-xscripts/xds-start-server.sh18
1 files changed, 12 insertions, 6 deletions
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 ""