Merge server.sh and local.sh
By setting BINDADDRESS and delegating to server.sh we can avoid
duplicating most of the code.
This also makes 0d5e1c1
available for local.sh, i.e. being able to
launch local.sh from arbitrary directories too.
This commit is contained in:
parent
661a09817a
commit
5ed67a6507
2 changed files with 3 additions and 10 deletions
|
@ -1,10 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# BRouter standalone server
|
BINDADDRESS="localhost" "$(dirname "$0")/server.sh"
|
||||||
# java -cp brouter.jar btools.brouter.RouteServer <segmentdir> <profile-map> <customprofiledir> <port> <maxthreads> [bindaddress]
|
|
||||||
|
|
||||||
# maxRunningTime is the request timeout in seconds, set to 0 to disable timeout
|
|
||||||
JAVA_OPTS="-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300"
|
|
||||||
CLASSPATH=../brouter.jar
|
|
||||||
|
|
||||||
java $JAVA_OPTS -cp $CLASSPATH btools.server.RouteServer ../segments4 ../profiles2 ../customprofiles 17777 1 localhost
|
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
# BRouter standalone server
|
# BRouter standalone server
|
||||||
# java -cp brouter.jar btools.brouter.RouteServer <segmentdir> <profile-map> <customprofiledir> <port> <maxthreads>
|
# java -cp brouter.jar btools.brouter.RouteServer <segmentdir> <profile-map> <customprofiledir> <port> <maxthreads> [bindaddress]
|
||||||
|
|
||||||
# maxRunningTime is the request timeout in seconds, set to 0 to disable timeout
|
# maxRunningTime is the request timeout in seconds, set to 0 to disable timeout
|
||||||
JAVA_OPTS="-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300"
|
JAVA_OPTS="-Xmx128M -Xms128M -Xmn8M -DmaxRunningTime=300"
|
||||||
CLASSPATH=../brouter.jar
|
CLASSPATH=../brouter.jar
|
||||||
|
|
||||||
java $JAVA_OPTS -cp $CLASSPATH btools.server.RouteServer ../segments4 ../profiles2 ../customprofiles 17777 1
|
java $JAVA_OPTS -cp $CLASSPATH btools.server.RouteServer ../segments4 ../profiles2 ../customprofiles 17777 1 $BINDADDRESS
|
||||||
|
|
Loading…
Reference in a new issue