OpenGrok revision 4e854c69a0484765dcd27b0e837898c8b6969bea
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos Kosco# OpenGrok Wrapper (initial setup and cron job updating)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# Supported Operating Systems:
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# - Solaris 10 (SunOS 5.10)
983523cf73bc85cce6282cb5aa78b60f6bcd959fLubos Kosco# - OpenSolaris (SunOS 5.11)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - Debian (Linux)
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# Supported Deployment Engines:
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - Tomcat 5.5
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - Glassfish
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# Supported Environment Variables:
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# - OPENGROK_NON_INTERACTIVE Suppress Progress and Warnings Messages (*)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_STANDARD_ENV Run Time Shell Environment (Shell Script)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_CONFIGURATION User Configuration (Shell Script)
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray# Supported Environment Variables for configuring the default setup:
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_DISTRIBUTION_BASE Base Directory of the OpenGrok Distribution
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_INSTANCE_BASE Base Directory of the OpenGrok User Data Area
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - EXUBERANT_CTAGS Full Path to Exuberant CTags
d961aa46ea0d50fed47802497e45226b1965b12dVladimir Kotal# - JAVA_HOME Full Path to Java Installation Root
d961aa46ea0d50fed47802497e45226b1965b12dVladimir Kotal# - OPENGROK_APP_SERVER Application Server ("Tomcat" or "Glassfish")
d961aa46ea0d50fed47802497e45226b1965b12dVladimir Kotal# - OPENGROK_WAR_TARGET_TOMCAT Tomcat Specific WAR Target Directory
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_WAR_TARGET_GLASSFISH Glassfish Specific WAR Target Directory
983523cf73bc85cce6282cb5aa78b60f6bcd959fLubos Kosco# - OPENGROK_WAR_TARGET Fallback WAR Target Directory
983523cf73bc85cce6282cb5aa78b60f6bcd959fLubos Kosco# - OPENGROK_TOMCAT_BASE Base Directory for Tomcat (contains webapps)
983523cf73bc85cce6282cb5aa78b60f6bcd959fLubos Kosco# - OPENGROK_GLASSFISH_BASE Base Directory for Glassfish (contains domains)
983523cf73bc85cce6282cb5aa78b60f6bcd959fLubos Kosco# - OPENGROK_GLASSFISH_DOMAIN Preferred Glassfish Domain Name
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_VERBOSE Enable Verbose Mode in opengrok.jar (*)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_REMOTE_REPOS Disable History Cache for (remote) Repositories (*)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_SCAN_REPOS Disable Scan for repositories (*)_
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_SCAN_DEPTH how deep should scanning for repos go (by default 3 directories from SRC_ROOT)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# - OPENGROK_DERBY if set, then indexer tries to use derby as historycache (see derby command of this script)
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# - READ_XML_CONFIGURATION file with read only configuration - a temp workaround for bug # 327
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# (*) Any Non-Empty String will enable these options
65df1e87266301e243dcead8082ca6255abea666Vladimir Kotal echo "Usage: ${0} <deploy|derby|update|updateQuietly|usage>" 1>&2
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal echo " OPENGROK_CONFIGURATION - location of your configuration" 1>&2
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal echo " e.g. $ OPENGROK_CONFIGURATION=/var/opengrok/myog.conf ${0} ... " 1>&2
6ce0623fa4ef95af9d77700a1c9c19ec1a919326Guillaume Smet echo " See the code for more information on configuration options / variables" 1>&2
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal# Runtime Configuration
3ba66fbb56ef22f183da783a1b2718280c357a4eStanislav Kozina# TODO: Handle symlinks correctly (especially in ${0})
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir KotalSCRIPT_DIRECTORY="`cd ${SCRIPT_DIRECTORY}; pwd`"
983523cf73bc85cce6282cb5aa78b60f6bcd959fLubos Kosco# Default Instance Configuration
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray # Use the built-in defaults. This section can be copied to its own
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray # file and tailored to your local requirements. Then simply set
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray # OPENGROK_CONFIGURATION=/path/to/your/configuration, before using
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # this wrapper. It will save you hand editing in your settings
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos Kosco # on each new release. A sample cron(1M) entry might look like:
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal # 15 0 * * * OPENGROK_CONFIGURATION=/pkgs/etc/OpenGrok.sh /pkgs/sbin/OpenGrok updateQuietly
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal # Note: It is not really possible to ever provided defaults for
cd348e325366620fe047edcc849e3c9424828599Peter Bray # these values which will run in every UNIX-like environment.
3b0448fdd830b8d04c6a71511e5d26a4fc3b5b80Lubos Kosco # So I have provided a set which are functional for a given
cd348e325366620fe047edcc849e3c9424828599Peter Bray # environment on which you can based you own configuration.
cd348e325366620fe047edcc849e3c9424828599Peter Bray # This has been updated to support more environment variables and
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal # operating systems, if you have any reasonably generic
6c8465e3b4611cb632cba9b0572e3e3737c8c341Vladimir Kotal # improvements please feel free to submit a patch.
fbf97ea1786d1e25add88bbfb91810170473bc9fLubos Kosco OPENGROK_INSTANCE_BASE="${OPENGROK_INSTANCE_BASE:-/var/opengrok}"
3b0448fdd830b8d04c6a71511e5d26a4fc3b5b80Lubos Kosco OPENGROK_DISTRIBUTION_BASE="${SCRIPT_DIRECTORY}/dist"
cd348e325366620fe047edcc849e3c9424828599Peter Bray LOGGER_CONF_SOURCE="${SCRIPT_DIRECTORY}/${LOGGER_CONFIG_FILE}"
cd348e325366620fe047edcc849e3c9424828599Peter Bray OPENGROK_DISTRIBUTION_BASE="${SCRIPT_DIRECTORY}/../lib"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray LOGGER_CONF_SOURCE="${OPENGROK_DISTRIBUTION_BASE}/../doc/${LOGGER_CONFIG_FILE}"
c276b1ec9722ee95a86a4a381b39c5f405fc1cc4Vladimir Kotal # (your source code or the root of all repositories)
c276b1ec9722ee95a86a4a381b39c5f405fc1cc4Vladimir Kotal # (for Lucene index and hypertext cross-references)
c276b1ec9722ee95a86a4a381b39c5f405fc1cc4Vladimir Kotal # This area is rebuilt by "update" / "updateQuietly"
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray # OPTIONAL: User Provided Source Path to Description Mapping (Tab Separated Value)
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray # (The user maintained source of the generated EftarFile file)
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray PATH_DESC="${OPENGROK_INSTANCE_BASE}/etc/paths.tsv"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray XML_CONFIGURATION="${OPENGROK_INSTANCE_BASE}/etc/configuration.xml"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # OPTIONAL: read only XML config, if it exists, it will be read
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray READ_XML_CONFIGURATION="${READ_XML_CONFIGURATION:-}"
cd348e325366620fe047edcc849e3c9424828599Peter Bray LOGGER_CONFIG_PATH="${OPENGROK_INSTANCE_BASE}/${LOGGER_CONFIG_FILE}"
cd348e325366620fe047edcc849e3c9424828599Peter Bray LOGGER_PROPERTIES="-Djava.util.logging.config.file=${LOGGER_CONFIG_PATH}"
cd348e325366620fe047edcc849e3c9424828599Peter Bray # REQUIRED: Java Archive of OpenGrok (Installation Location)
cd348e325366620fe047edcc849e3c9424828599Peter Bray OPENGROK_JAR="${OPENGROK_DISTRIBUTION_BASE}/opengrok.jar"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # REQUIRED(deploy): Web Archive of OpenGrok (Distribution Location)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # (user building from source code will find this and other key
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # files in the "dist" directory after the build is completed)
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos Kosco OPENGROK_DIST_WAR="${OPENGROK_DISTRIBUTION_BASE}/source.war"
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos Kosco # REQUIRED: Exuberant CTags (http://ctags.sf.net)
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray EXUBERANT_CTAGS="${EXUBERANT_CTAGS:-`FindExuberantCTags`}"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # DEVELOPMENT: Debug option, if enabled current indexer will listen on the port 8010 until a debugger connects
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray #JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,server=y,address=8010,suspend=y"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # OPTIONAL: Ignore these patterns as names of files or directories
c83dfde6b364917fa8ed28142d509a7c29a4da68Vladimir Kotal # (Every directory in SRC_ROOT is considered a separate project)
cd348e325366620fe047edcc849e3c9424828599Peter Bray # OPTIONAL: Scanning Options (for Mercurial repositories)
cd348e325366620fe047edcc849e3c9424828599Peter Bray # OPTIONAL: Remote Repository Support (CVS or SVN)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # (Can be very time demanding, uncomment if needed)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # OPTIONAL: override depth of scanning for repositories
bc5565fc58603964988b42b6aee40e246f35d94fVladimir Kotal # OPTIONAL: Set Maximum Indexed Words Per File
bc5565fc58603964988b42b6aee40e246f35d94fVladimir Kotal # Note, that you might run out of memory, then either increase JVM memory
bc5565fc58603964988b42b6aee40e246f35d94fVladimir Kotal # as noted in JAVA_OPTS, or set this limit(if you don't mind opengrok not
bc5565fc58603964988b42b6aee40e246f35d94fVladimir Kotal # indexing the rest of the file, once the limit is reached)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # Assumption: We should not set properties to the empty string
cd348e325366620fe047edcc849e3c9424828599Peter Bray${HG:+-Dorg.opensolaris.opengrok.history.Mercurial=$HG} \
cd348e325366620fe047edcc849e3c9424828599Peter Bray${CVS:+-Dorg.opensolaris.opengrok.history.cvs=$CVS} \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray${SVN:+-Dorg.opensolaris.opengrok.history.Subversion=$SVN} \
cd348e325366620fe047edcc849e3c9424828599Peter Bray${SCCS:+-Dorg.opensolaris.opengrok.history.SCCS=$SCCS} \
56d93b0c761868f813ac0bc0b5bc21a7a9fefd89Vladimir Kotal${CLEARCASE:+-Dorg.opensolaris.opengrok.history.ClearCase=$CLEARCASE} \
56d93b0c761868f813ac0bc0b5bc21a7a9fefd89Vladimir Kotal${GIT:+-Dorg.opensolaris.opengrok.history.git=$GIT} \
4f3c0816485669143aa54f1c6461fcb47cf5bc5cVladimir Kotal${P4:+-Dorg.opensolaris.opengrok.history.Perforce=$P4} \
4f3c0816485669143aa54f1c6461fcb47cf5bc5cVladimir Kotal${MTN:+-Dorg.opensolaris.opengrok.history.Monotone=$MTN} \
2b024356b830395446c55f50f9f724a63612e578Lubos Kosco${BZR:+-Dorg.opensolaris.opengrok.history.Bazaar=$BZR} \
17d95a647aba8c37d9ac34d97e4eed729aa46f67Naseer Ahmed # OPTIONAL: Store The History Cache in Java DB (derby),
17d95a647aba8c37d9ac34d97e4eed729aa46f67Naseer Ahmed # instead of file system (in gzipped xml files).
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray # - derbyclient.jar - See README.txt for more details
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray # - Running Derby Server - Defaults to localhost:1527
c842732324ee4c74ede17887ad1f0dcdc4364a2cLubos Kosco # Usage: <class> inputFile [inputFile ...] outputFile
cd348e325366620fe047edcc849e3c9424828599Peter Bray # EftarFile == An Extremely Fast Tagged Attribute Read-only File System
b17cb0705d90907337b3528aa7b8ed1700806f26Vladimir Kotal EFTAR_UPDATE="org.opensolaris.opengrok.web.EftarFile"
425278cfacbc73f1e955ab6016f206fc5ed93ccbVladimir Kotal # HARDCODED: Generated EftarFile (See web/*.jsp)
8f8c3f4555e5aa3160f03f2e9c55ddbd3381357bLubos Kosco EFTAR_OUTPUT_FILE="${DATA_ROOT}/index/dtags.eftar"
8f8c3f4555e5aa3160f03f2e9c55ddbd3381357bLubos Kosco # Be Quiet? (set indirectly by command line arguments in the main program)
2cf31ec93bd5d8a2efeab511ce051da51e69aedaLubos Kosco# Helper Functions - Logging
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray# In general, non-interactive use like cron jobs and automated
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray# installation environments should not generate unnecessary
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray# progress information or warnings, as usage and configuration
1a5c2ab40bd94d2b2c63afda767ce7bbf29ecc4bJan Friedel# will have generally been debugged prior to automation.
2b024356b830395446c55f50f9f724a63612e578Lubos Kosco# Helper Functions - Autodetection of Runtime Environment
d280c5e286f5b98be13237f52281ae5afdcf51b9Peter Bray Error "Unable to determine Exuberant CTags command name" \
3ba66fbb56ef22f183da783a1b2718280c357a4eStanislav Kozina SunOS:5.10) javaHome="/usr/jdk/instances/jdk1.6.0" ;;
3ba66fbb56ef22f183da783a1b2718280c357a4eStanislav Kozina javaHome=`ls -l /etc/alternatives/java | cut -f 2 -d \> `
cd348e325366620fe047edcc849e3c9424828599Peter Bray if [ -f ${dir}/bin/java ]
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos Kosco # Use this function to determine which environment the deploy the
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # web application function into. Some users (especially
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # developers) will have many deployment environments or will wish
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # to specify directly the application server to deploy to.
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # Either use the environment variable OPENGROK_APP_SERVER or
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # reimplement this function in your configuration file (as
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # This implementation favours Tomcat, but needs a lot of work,
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # especially if Glassfish is perferrerd or it is under the control
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # Maybe a better implementation would be to call Application
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # Server specific WAR Directory and see if they exist.
0ca9a2c194523c517c3aafe5758e217ac88d6baaLubos Kosco if [ -x "/etc/init.d/appserv" -a -d "/var/appserver/domains" ]
c276b1ec9722ee95a86a4a381b39c5f405fc1cc4Vladimir Kotal directory="${domainDirectory}/${OPENGROK_GLASSFISH_DOMAIN}/autodeploy"
4e854c69a0484765dcd27b0e837898c8b6969beaTrond Norbye FatalError "Missing Specified Glassfish Domain ${OPENGROK_GLASSFISH_DOMAIN}"
a3a5f5c0500064f4c6ac3658b1e3e4d838912329Lubos Kosco firstDomain=`ls -1 ${domainDirectory} | head -1`
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray FatalError "Failed to dynamically determine Glassfish Domain from ${domainDirectory}"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray echo "${domainDirectory}/${firstDomain}/autodeploy"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# Implementation
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray# The variable "DO" can usefully be set to "echo" to aid in script debugging
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # Setup a standard execution environment (if required)
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray OPENGROK_STANDARD_ENV="${OPENGROK_STANDARD_ENV:-/pkgs/sbin/CronExecutionEnvironment.sh}"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # Note: As all functions have been defined by the time this routine
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # is called, your configuration can, if desired, override functions
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # in addition to setting the variables mentioned in the function
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # DefaultInstanceConfiguration(), this maybe useful to override
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # functionality used to determine the default deployment environment
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray # find dependencies or validate the configuration, for example.
340e2c0d70fade14c720931c87652727b941c167Vladimir Kotal if [ -n "${OPENGROK_CONFIGURATION}" -a -f "${OPENGROK_CONFIGURATION}" ]
fe967af3e58b6c8feaecf15b06fc1d5401b07914Lubos Kosco # Load the Local OpenGrok Configuration Environment
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Progress "Loading the default instance configuration ..."
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray FatalError "Missing Dependent Application - Exuberant CTags"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray FatalError "OpenGrok Source Path ${SRC_ROOT} doesn't exist"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Warning "Both Quiet and Verbose Mode Enabled - Choosing Verbose"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Warning "CHECK: derbyclient.jar needs to be in where the rest of opengrok used jars are and in unpacked source.war in WEB-INF/lib !!!"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Warning "OpenGrok generated data path ${DATA_ROOT} doesn't exist"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Progress " Attempting to create generated data directory ... "
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray FatalError "OpenGrok data path ${DATA_ROOT} doesn't exist"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Warning "OpenGrok generated etc path ${OPENGROK_INSTANCE_BASE}/etc doesn't exist"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Progress " Attempting to create generated etc directory ... "
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray FatalError "OpenGrok etc path ${OPENGROK_INSTANCE_BASE}/etc doesn't exist"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray if [ -n "${LOGGER_CONFIG_PATH}" -a ! -f "${LOGGER_CONFIG_PATH}" ]
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Progress " Creating default ${LOGGER_CONFIG_PATH} ... "
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Warning "Can't find distribution logging configuration" \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray "(${LOGGER_CONF_SOURCE}) to install as default" \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray ${DO} grep -v java.util.logging.FileHandler.pattern "${LOGGER_CONF_SOURCE}" > "${LOGGER_CONFIG_PATH}"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray ${DO} grep java.util.logging.FileHandler.pattern "${LOGGER_CONF_SOURCE}" | sed "s|opengrok%g.%u.log|${OPENGROK_INSTANCE_BASE}/log/opengrok%g.%u.log|g" >> "${LOGGER_CONFIG_PATH}"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Warning "OpenGrok generated derby path ${OPENGROK_INSTANCE_BASE}/derby doesn't exist"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Progress " Attempting to create generated derby directory ... "
56d93b0c761868f813ac0bc0b5bc21a7a9fefd89Vladimir Kotal ${SCAN_FOR_REPOSITORY} ${REMOTE_REPOSITORIES} \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray ${MAX_INDEXED_WORDS} ${SKIN} ${LEADING_WILDCARD} \
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray ${EFTAR_UPDATE} ${PATH_DESC} ${EFTAR_OUTPUT_FILE}
0b2998be561e7bf5e3479d686a5af36f712b0d9aVladimir Kotal ${DO} ${JAVA} ${JAVA_OPTS} -jar ${OPENGROK_JAR} '-?'
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Tomcat) warTarget="`DetermineWarDirectoryTomcat`" ;;
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray Glassfish) warTarget="`DetermineWarDirectoryGlassfish`" ;;
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray *) FatalError "Unsupported Application Server ${applicationServer}" ;;
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray FatalError "Unable to determine Deployment Directory for ${applicationServer}"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray FatalError "Missing Web Application Archive ${OPENGROK_DIST_WAR}"
d2a02e104622a26dd90fa88f4f17188f2039809fPeter Bray FatalError "Missing Deployment Directory ${warTarget}"
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray Progress "Installing ${OPENGROK_DIST_WAR} to ${warTarget} ..."
c577d2f6c082eaff9af5bc997d12f3d3bcef537cPeter Bray if [ $? != 0 ]
83439b4ed8fe40097dc3f2c05168d26bd7926159Vladimir Kotal Progress "Start your application server (${applicationServer}), if it is not already"
83439b4ed8fe40097dc3f2c05168d26bd7926159Vladimir Kotal Progress "running, or wait until it loads the just installed web application."
83439b4ed8fe40097dc3f2c05168d26bd7926159Vladimir Kotal Progress "OpenGrok should be available on <HOST>:<PORT>/source"
83439b4ed8fe40097dc3f2c05168d26bd7926159Vladimir Kotal Progress " where HOST and PORT are configured in ${applicationServer}."
477c09a2656e6a2c1075425ad81e61d594164fa9Lubos Kosco java -Dderby.system.home=$DATA_ROOT/derby -jar /usr/lib/jvm/java-6-sun/db/lib/derbynet.jar start
477c09a2656e6a2c1075425ad81e61d594164fa9Lubos Kosco# Main Program
0b2998be561e7bf5e3479d686a5af36f712b0d9aVladimir Kotal if [ -n "${2}" ]