blob: 7b04e457c8142bc790f9987a2a9de82212c52e20 [file] [log] [blame]
Simon Hunt4d99c292015-06-04 18:09:35 -07001#######------------------------------------------------------------
2# CORD Demo
3# =========
4
Jonathan Hart4809de72015-06-05 09:37:12 -07005export LISTENPORT=8080
Simon Hunt4d99c292015-06-04 18:09:35 -07006export JETTY="-jar jetty-runner.jar"
Brian O'Connor880dc20d2015-12-16 22:53:14 -08007export CORD=./cord-gui-1.5.0-SNAPSHOT.war
Simon Hunt4d99c292015-06-04 18:09:35 -07008export LOGDBG=-Dorg.onosproject.cord.gui.LEVEL=DEBUG
9export DEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n"
10export LOG=cord.log
11
Simon Huntc296d2c2015-06-08 12:54:57 -070012DBG=""
13if [ "$1" = "debug" ]
14then
15 shift
16 DBG=$DEBUG
17fi
18
Simon Hunt4d99c292015-06-04 18:09:35 -070019IP="$1"
20PORT="$2"
21
22if [ ! -z "$IP" ]
23then
24 PARAM1="-Dheadnodeip=$IP"
25else
26 PARAM1=""
27fi
28
29if [ ! -z "$PORT" ]
30then
31 PARAM2="-Dheadnodeport=$PORT"
32else
33 PARAM2=""
34fi
35
Simon Huntc296d2c2015-06-08 12:54:57 -070036java $PARAM1 $PARAM2 $LOGDBG $DBG $JETTY --port $LISTENPORT $CORD >$LOG 2>&1 &
Simon Hunt4d99c292015-06-04 18:09:35 -070037
38echo jetty-runner started {$PARAM1:$PARAM2}
39echo .. logging to $LOG