OpenGrok revision d7c1415de39f4b07c85828f49cd1ee7a2a19eb9e
6ae232055d4d8a97267517c5e50074c2c819941and# OpenGrok Wrapper (initial setup and cron job updating)
6ae232055d4d8a97267517c5e50074c2c819941and# Supported Operating Systems:
6ae232055d4d8a97267517c5e50074c2c819941and# - Solaris 10 (SunOS 5.10)
6ae232055d4d8a97267517c5e50074c2c819941and# - OpenSolaris (SunOS 5.11)
6ae232055d4d8a97267517c5e50074c2c819941and# - Debian (Linux)
6ae232055d4d8a97267517c5e50074c2c819941and# Supported Deployment Engines:
6ae232055d4d8a97267517c5e50074c2c819941and# - Tomcat 6
6ae232055d4d8a97267517c5e50074c2c819941and# - Tomcat 5.5
6ae232055d4d8a97267517c5e50074c2c819941and# - Glassfish
6ae232055d4d8a97267517c5e50074c2c819941and# Supported Environment Variables:
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_NON_INTERACTIVE Suppress Progress and Warnings Messages (*)
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_STANDARD_ENV Run Time Shell Environment (Shell Script)
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_CONFIGURATION User Configuration (Shell Script)
6ae232055d4d8a97267517c5e50074c2c819941and# Supported Environment Variables for configuring the default setup:
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_DISTRIBUTION_BASE Base Directory of the OpenGrok Distribution
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_INSTANCE_BASE Base Directory of the OpenGrok User Data Area
6ae232055d4d8a97267517c5e50074c2c819941and# - EXUBERANT_CTAGS Full Path to Exuberant CTags
6ae232055d4d8a97267517c5e50074c2c819941and# - JAVA_HOME Full Path to Java Installation Root
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_APP_SERVER Application Server ("Tomcat" or "Glassfish")
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_WAR_TARGET_TOMCAT Tomcat Specific WAR Target Directory
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_WAR_TARGET_GLASSFISH Glassfish Specific WAR Target Directory
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_WAR_TARGET Fallback WAR Target Directory
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_TOMCAT_BASE Base Directory for Tomcat (contains webapps)
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_GLASSFISH_BASE Base Directory for Glassfish (contains domains)
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_GLASSFISH_DOMAIN Preferred Glassfish Domain Name
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_VERBOSE Enable Verbose Mode in opengrok.jar (*)
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_REMOTE_REPOS Enable History Cache for Remote Repositories (*)
6ae232055d4d8a97267517c5e50074c2c819941and# - OPENGROK_SCAN_REPOS Scan for repositories (*)_
6ae232055d4d8a97267517c5e50074c2c819941and# - READ_XML_CONFIGURATION file with read only configuration - a temp workaround for bug # 327
6ae232055d4d8a97267517c5e50074c2c819941and# (*) Any Non-Empty String will enable these options
6ae232055d4d8a97267517c5e50074c2c819941and echo "Usage: ${0} <deploy|update|updateQuietly|usage>" 1>&2
6ae232055d4d8a97267517c5e50074c2c819941and echo " OPENGROK_CONFIGURATION - location of your configuration" 1>&2
6ae232055d4d8a97267517c5e50074c2c819941and echo " e.g. $ OPENGROK_CONFIGURATION=/var/opengrok/myog.conf ${0} ... " 1>&2
6ae232055d4d8a97267517c5e50074c2c819941and echo " See the code for more information on configuration options / variables" 1>&2
6ae232055d4d8a97267517c5e50074c2c819941and# Runtime Configuration
6ae232055d4d8a97267517c5e50074c2c819941and# TODO: Handle symlinks correctly (especially in ${0})
6ae232055d4d8a97267517c5e50074c2c819941and# Default Instance Configuration
6ae232055d4d8a97267517c5e50074c2c819941and # Use the built-in defaults. This section can be copied to its own
6ae232055d4d8a97267517c5e50074c2c819941and # file and tailored to your local requirements. Then simply set
6ae232055d4d8a97267517c5e50074c2c819941and # OPENGROK_CONFIGURATION=/path/to/your/configuration, before using
6ae232055d4d8a97267517c5e50074c2c819941and # this wrapper. It will save you hand editing in your settings
6ae232055d4d8a97267517c5e50074c2c819941and # on each new release. A sample cron(1M) entry might look like:
6ae232055d4d8a97267517c5e50074c2c819941and # 15 0 * * * OPENGROK_CONFIGURATION=/pkgs/etc/OpenGrok.sh /pkgs/sbin/OpenGrok updateQuietly
6ae232055d4d8a97267517c5e50074c2c819941and # Note: It is not really possible to ever provided defaults for
6ae232055d4d8a97267517c5e50074c2c819941and # these values which will run in every UNIX-like environment.
6ae232055d4d8a97267517c5e50074c2c819941and # So I have provided a set which are functional for a given
6ae232055d4d8a97267517c5e50074c2c819941and # environment on which you can based you own configuration.
6ae232055d4d8a97267517c5e50074c2c819941and # This has been updated to support more environment variables and
6ae232055d4d8a97267517c5e50074c2c819941and OPENGROK_INSTANCE_BASE="${OPENGROK_INSTANCE_BASE:-/var/opengrok}"
6ae232055d4d8a97267517c5e50074c2c819941and LOGGER_CONF_SOURCE="${SCRIPT_DIRECTORY}/conf/${LOGGER_CONFIG_FILE}"
6ae232055d4d8a97267517c5e50074c2c819941and LOGGER_CONF_SOURCE="${OPENGROK_DISTRIBUTION_BASE}/${LOGGER_CONFIG_FILE}"
6ae232055d4d8a97267517c5e50074c2c819941and # OPTIONAL: User Provided Source Path to Description Mapping (Tab Separated Value)
6ae232055d4d8a97267517c5e50074c2c819941and # (The user maintained source of the generated EftarFile file)
export JAVA_HOME
# DEVELOPMENT: Debug option, if enabled current indexer will listen on the port 8010 until a debugger connects
${CVS:+-Dorg.opensolaris.opengrok.history.cvs=$CVS} \
${SCCS:+-Dorg.opensolaris.opengrok.history.SCCS=$SCCS} \
${CLEARCASE:+-Dorg.opensolaris.opengrok.history.ClearCase=$CLEARCASE} \
${GIT:+-Dorg.opensolaris.opengrok.history.git=$GIT} \
${DO} exit 2
${OPENGROK_TOMCAT_BASE} \
${DO} ${JAVA} ${JAVA_OPTS} ${PROPERTIES} \
${LOGGER_PROPERTIES} \
${JAVA_DEBUG} \
-jar ${OPENGROK_JAR} \
${IGNORE_PATTERNS} ${ENABLE_PROJECTS} \
${DERBY_HISTORY_CACHE} \
${EXUBERANT_CTAGS:+-c} ${EXUBERANT_CTAGS} \
${MAX_INDEXED_WORDS} ${SKIN} ${LEADING_WILDCARD} \
${READ_XML_CONF} \
-W ${XML_CONFIGURATION} \
${DO} ${JAVA} -classpath ${OPENGROK_JAR} \
${EFTAR_UPDATE} ${PATH_DESC} ${EFTAR_OUTPUT_FILE}