Skip to content

Commit 6ce0623

Browse files
gsmetLubos Kosco
authored andcommitted
introduce OPENGROK_WEBAPP_CONTEXT for setting the webapp context
1 parent a8c3d34 commit 6ce0623

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

OpenGrok

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
# (by default 3 directories from SRC_ROOT)
4848
# - OPENGROK_WEBAPP_CFGADDR Web app address to send configuration to
4949
# (use "none" to avoid sending it to web app)
50+
# - OPENGROK_WEBAPP_CONTEXT Context URL of the OpenGrok webapp
51+
# (by default /source)
5052
# - OPENGROK_WPREFIX Disable wildcard prefix search query
5153
# support (*)
5254
# - OPENGROK_DERBY if set, then indexer tries to use derby as
@@ -271,6 +273,13 @@ DefaultInstanceConfiguration()
271273
WEBAPP_CONFIG="-U ${WEBAPP_CONFIG_ADDRESS}"
272274
fi
273275

276+
# OPTIONAL: Context URL of the OpenGrok webapp
277+
# (default is /source)
278+
WEBAPP_CONTEXT=""
279+
if [ -n "${OPENGROK_WEBAPP_CONTEXT}" ]; then
280+
WEBAPP_CONTEXT="-w ${OPENGROK_WEBAPP_CONTEXT}"
281+
fi
282+
274283
# OPTIONAL: JVM Options
275284
JAVA_OPTS="${JAVA_OPTS:--Xmx2048m}"
276285

@@ -763,6 +772,7 @@ StdInvocation()
763772
${READ_XML_CONF} \
764773
-W ${XML_CONFIGURATION} \
765774
${WEBAPP_CONFIG} \
775+
${WEBAPP_CONTEXT} \
766776
-s ${SRC_ROOT} -d ${DATA_ROOT} \
767777
"${@}"
768778
}

0 commit comments

Comments
 (0)