OpenGrok revision 979
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater# OpenGrok Wrapper (initial setup and cron job updating)
1167fc7904c5f0a472f8df207ac46dd52c7f1ec8Automatic Updater# Supported Operating Systems:
0c39b3ed9409ecb277d5e32fa763a4e4d6598df8Automatic Updater# - Solaris 10 (SunOS 5.10)
46da3117812814a29432a8d9a9ccf8acdbfdadceAutomatic Updater# - OpenSolaris (SunOS 5.11)
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# - Debian (Linux)
79b273c187a4aa1016a62181983dfdd0521681aeMark Andrews# Supported Deployment Engines:
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# - Tomcat 5.5
ac4e70ff8955669341f435bc0a734a17c01af124Mark Andrews# - Glassfish
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Supported Environment Variables:
9cd5eb6fe0f26d65724b99216cb31dcdd12e4afdAutomatic Updater# - OPENGROK_NON_INTERACTIVE Suppress Progress and Warnings Messages (*)
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater# - OPENGROK_STANDARD_ENV Run Time Shell Environment (Shell Script)
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater# - OPENGROK_CONFIGURATION User Configuration (Shell Script)
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater# Supported Environment Variables for configuring the default setup:
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater# - OPENGROK_DISTRIBUTION_BASE Base Directory of the OpenGrok Distribution
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# - OPENGROK_INSTANCE_BASE Base Directory of the OpenGrok User Data Area
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# - EXUBERANT_CTAGS Full Path to Exuberant CTags
e171a4137c6ba348957e61b7c4c3541493c0da02Automatic Updater# - JAVA_HOME Full Path to Java Installation Root
831f79c4310a7d38fc3475ccfff531b2b2535641Automatic Updater# - OPENGROK_APP_SERVER Application Server ("Tomcat" or "Glassfish")
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# - OPENGROK_WAR_TARGET_TOMCAT Tomcat Specific WAR Target Directory
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# - OPENGROK_WAR_TARGET_GLASSFISH Glassfish Specific WAR Target Directory
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews# - OPENGROK_WAR_TARGET Fallback WAR Target Directory
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# - OPENGROK_TOMCAT_BASE Base Directory for Tomcat (contains webapps)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# - OPENGROK_GLASSFISH_BASE Base Directory for Glassfish (contains domains)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# - OPENGROK_GLASSFISH_DOMAIN Preferred Glassfish Domain Name
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# - OPENGROK_VERBOSE Enable Verbose Mode in opengrok.jar (*)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson# - OPENGROK_REMOTE_REPOS Disable History Cache for (remote) Repositories (*)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# - OPENGROK_SCAN_REPOS Disable Scan for repositories (*)_
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# - READ_XML_CONFIGURATION file with read only configuration - a temp workaround for bug # 327
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# (*) Any Non-Empty String will enable these options
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater echo "Usage: ${0} <deploy|update|updateQuietly|usage>" 1>&2
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater echo " Optional environment variables:" 1>&2
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater echo " OPENGROK_CONFIGURATION - location of your configuration" 1>&2
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater echo " e.g. $ OPENGROK_CONFIGURATION=/var/opengrok/myog.conf ${0} ... " 1>&2
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater echo " See the code for more information on configuration options / variables" 1>&2
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Runtime Configuration
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic Updater# TODO: Handle symlinks correctly (especially in ${0})
930f6069e5aa157cf6987cdafd412f5757a5a558Automatic UpdaterSCRIPT_DIRECTORY="`cd ${SCRIPT_DIRECTORY}; pwd`"
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater# Default Instance Configuration
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # Use the built-in defaults. This section can be copied to its own
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson # file and tailored to your local requirements. Then simply set
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # OPENGROK_CONFIGURATION=/path/to/your/configuration, before using
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # this wrapper. It will save you hand editing in your settings
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark Andrews # on each new release. A sample cron(1M) entry might look like:
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # 15 0 * * * OPENGROK_CONFIGURATION=/pkgs/etc/OpenGrok.sh /pkgs/sbin/OpenGrok updateQuietly
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # Note: It is not really possible to ever provided defaults for
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # these values which will run in every UNIX-like environment.
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson # So I have provided a set which are functional for a given
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # environment on which you can based you own configuration.
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater # This has been updated to support more environment variables and
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews # operating systems, if you have any reasonably generic
11af78f7dc35741bdab68dbab11b03daab005b28Automatic Updater # improvements please feel free to submit a patch.
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews OPENGROK_INSTANCE_BASE="${OPENGROK_INSTANCE_BASE:-/var/opengrok}"
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater -f "${SCRIPT_DIRECTORY}/dist/opengrok.jar" -a \
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews OPENGROK_DISTRIBUTION_BASE="${SCRIPT_DIRECTORY}/dist"
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews LOGGER_CONF_SOURCE="${SCRIPT_DIRECTORY}/${LOGGER_CONFIG_FILE}"
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews OPENGROK_DISTRIBUTION_BASE="${SCRIPT_DIRECTORY}/../lib"
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews LOGGER_CONF_SOURCE="${OPENGROK_DISTRIBUTION_BASE}/../doc/${LOGGER_CONFIG_FILE}"
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic Updater # (your source code or the root of all repositories)
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater # (for Lucene index and hypertext cross-references)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # This area is rebuilt by "update" / "updateQuietly"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater DATA_ROOT="${OPENGROK_INSTANCE_BASE}/data"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # OPTIONAL: User Provided Source Path to Description Mapping (Tab Separated Value)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater # (The user maintained source of the generated EftarFile file)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson PATH_DESC="${OPENGROK_INSTANCE_BASE}/etc/paths.tsv"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson # (the configuration used by Web/GUI interfaces)
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater XML_CONFIGURATION="${OPENGROK_INSTANCE_BASE}/etc/configuration.xml"
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater # OPTIONAL: read only XML config, if it exists, it will be read
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater READ_XML_CONFIGURATION="${READ_XML_CONFIGURATION:-}"
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater if [ -f "${READ_XML_CONFIGURATION}" ] ; then
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater READ_XML_CONF="-R ${READ_XML_CONFIGURATION}"
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater LOGGER_CONFIG_PATH="${OPENGROK_INSTANCE_BASE}/${LOGGER_CONFIG_FILE}"
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater LOGGER_PROPERTIES="-Djava.util.logging.config.file=${LOGGER_CONFIG_PATH}"
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater # REQUIRED: Java Archive of OpenGrok (Installation Location)
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater OPENGROK_JAR="${OPENGROK_DISTRIBUTION_BASE}/opengrok.jar"
3e5340279d8875d136a4dd815cccad0044aa2644Automatic Updater # REQUIRED(deploy): Web Archive of OpenGrok (Distribution Location)
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic Updater # (user building from source code will find this and other key
da82e232161d67b77df2d67898bdac693f647be1Automatic Updater # files in the "dist" directory after the build is completed)
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater OPENGROK_DIST_WAR="${OPENGROK_DISTRIBUTION_BASE}/source.war"
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater # REQUIRED: Exuberant CTags (http://ctags.sf.net)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater EXUBERANT_CTAGS="${EXUBERANT_CTAGS:-`FindExuberantCTags`}"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # DEVELOPMENT: Debug option, if enabled current indexer will listen on the port 8010 until a debugger connects
59528addd704f8d5757b54e540520f74e588a7c7Automatic Updater #JAVA_DEBUG="-agentlib:jdwp=transport=dt_socket,server=y,address=8010,suspend=y"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # OPTIONAL: Ignore these patterns as names of files or directories
3f616e6f846be57b1717c6beaba0f74de9d5a7c6Automatic Updater # (Every directory in SRC_ROOT is considered a separate project)
19b3dc94bce93fa76bd7e066f9298630dbc9dcb4Automatic Updater # OPTIONAL: Scanning Options (for Mercurial repositories)
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater # OPTIONAL: Remote Repository Support (CVS or SVN)
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # (Can be very time demanding, uncomment if needed)
bbb069be941f649228760edcc241122933c066d2Automatic Updater # OPTIONAL: Allow Leading Wildcard Searches
80faf1588895fd26490f82f95a7a1b771df1c324Automatic Updater # (Options: default, offwhite and polished.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews # Note, that you might run out of memory, then either increase JVM memory
765c97d56ccddc9d7904c7d9ff2e2d825d9687e4Automatic Updater # as noted in JAVA_OPTS, or set this limit(if you don't mind opengrok not
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews # indexing the rest of the file, once the limit is reached)
3f616e6f846be57b1717c6beaba0f74de9d5a7c6Automatic Updater # OPTIONAL: Configuration Address (host:port)
229ea4644b3a7d9c7fdaa43888e7f55ba01e2ee3Automatic Updater # (conf/web.xml default is localhost:2424)
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater # OPTIONAL: Full Path to History Utilities
8711e5c73ca872d59810760af0332194cbdd619bAutomatic Updater # Assumption: We should not set properties to the empty string
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington${HG:+-Dorg.opensolaris.opengrok.history.Mercurial=$HG} \
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater${CVS:+-Dorg.opensolaris.opengrok.history.cvs=$CVS} \
3857cb6fcabeb79d85de4b3e3e4ab99912b701f8Mark Andrews${SVN:+-Dorg.opensolaris.opengrok.history.Subversion=$SVN} \
572cb2c1c931f6bc6a4a019c103ae88239b0eb96Automatic Updater${SCCS:+-Dorg.opensolaris.opengrok.history.SCCS=$SCCS} \
7858b0168b866c0c2878fc4ea31fb5e581c1a6a9Automatic Updater${CLEARCASE:+-Dorg.opensolaris.opengrok.history.ClearCase=$CLEARCASE} \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews${GIT:+-Dorg.opensolaris.opengrok.history.git=$GIT} \
9174e44c14b1cb91a651fa1dc29470438c246ab9Automatic Updater${P4:+-Dorg.opensolaris.opengrok.history.Perforce=$P4} \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson${MTN:+-Dorg.opensolaris.opengrok.history.Monotone=$MTN} \
e2caa7536302de34de6cc04025abcd53dc3a499aAutomatic Updater${BZR:+-Dorg.opensolaris.opengrok.history.Bazaar=$BZR} \
8292deab031e7599cd7622aa7675fbe139ca6095Mark Andrews # OPTIONAL: Store The History Cache in Java DB (derby),
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews # instead of file system (in gzipped xml files).
ca35524ce2b57e6f1b261d23565d1288a355d12fAutomatic Updater # - derbyclient.jar - See README.txt for more details
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews # - Running Derby Server - Defaults to localhost:1527
3351ccbd5c1961404044f8273d54dad405f53960Mark Andrews # Usage: <class> inputFile [inputFile ...] outputFile
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater # EftarFile == An Extremely Fast Tagged Attribute Read-only File System
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews EFTAR_UPDATE="org.opensolaris.opengrok.web.EftarFile"
3351ccbd5c1961404044f8273d54dad405f53960Mark Andrews # HARDCODED: Generated EftarFile (See web/*.jsp)
7d12a6b412fe47e6d6582923fd6954ab8cd0baebAutomatic Updater EFTAR_OUTPUT_FILE="${DATA_ROOT}/index/dtags.eftar"
0b57424d28c9a67018107133f9fbc0a7dcf057e2Mark Andrews # Be Quiet? (set indirectly by command line arguments in the main program)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# Helper Functions - Logging
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# In general, non-interactive use like cron jobs and automated
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic Updater# installation environments should not generate unnecessary
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater# progress information or warnings, as usage and configuration
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# will have generally been debugged prior to automation.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Helper Functions - Autodetection of Runtime Environment
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Error "Unable to determine Exuberant CTags command name" \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington SunOS:5.10) javaHome="/usr/jdk/instances/jdk1.6.0" ;;
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Linux:*) javaHome="/usr/lib/jvm/java-6-sun" ;;
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater # Use this function to determine which environment the deploy the
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater # web application function into. Some users (especially
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater # developers) will have many deployment environments or will wish
ae7e54b14c946e0984c191554db9abb4893f9349Automatic Updater # to specify directly the application server to deploy to.
0d3490f93bb980fde704055e74c1b508987a5fe4Mark Andrews # Either use the environment variable OPENGROK_APP_SERVER or
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington # reimplement this function in your configuration file (as
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews # This implementation favours Tomcat, but needs a lot of work,
348040cb2675f1c3711672dadfc29f5ddfd2bb23Automatic Updater # especially if Glassfish is perferrerd or it is under the control
099b86fb8136a7dff81df85cf395978c16eb254cAutomatic Updater # Maybe a better implementation would be to call Application
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # Server specific WAR Directory and see if they exist.
765c97d56ccddc9d7904c7d9ff2e2d825d9687e4Automatic Updater if [ -x "/etc/init.d/appserv" -a -d "/var/appserver/domains" ]
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if [ -n "${OPENGROK_WAR_TARGET_GLASSFISH}" ]
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington directory="${domainDirectory}/${OPENGROK_GLASSFISH_DOMAIN}/autodeploy"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington FatalError "Missing Specified Glassfish Domain ${OPENGROK_GLASSFISH_DOMAIN}"
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater firstDomain=`ls -1 ${domainDirectory} | head -1`
42bee07ebb8152a6ec2f87f4790d87368c24704cAutomatic Updater FatalError "Failed to dynamically determine Glassfish Domain from ${domainDirectory}"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington echo "${domainDirectory}/${firstDomain}/autodeploy"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Implementation
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# The variable "DO" can usefully be set to "echo" to aid in script debugging
7adcb4de92bf4383a4c5624c4ed256736d02bc6dMark Andrews # Setup a standard execution environment (if required)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington OPENGROK_STANDARD_ENV="${OPENGROK_STANDARD_ENV:-/pkgs/sbin/CronExecutionEnvironment.sh}"
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington Progress "Loading ${OPENGROK_STANDARD_ENV} ..."
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updater # Note: As all functions have been defined by the time this routine
84a18c72b9f05a7d2aabbc50886de494251d1719Automatic Updater # is called, your configuration can, if desired, override functions
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington # in addition to setting the variables mentioned in the function
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # DefaultInstanceConfiguration(), this maybe useful to override
79cea03ba823e2d3a34895f0ba91d7fb5ad799e7Automatic Updater # functionality used to determine the default deployment environment
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # find dependencies or validate the configuration, for example.
8ccd7da886e93cd490fcb6f4c4e98a6514f35820Automatic Updater if [ -n "${OPENGROK_CONFIGURATION}" -a -f "${OPENGROK_CONFIGURATION}" ]
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater # Load the Local OpenGrok Configuration Environment
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater Progress "Loading ${OPENGROK_CONFIGURATION} ..."
b0d566a2ce0f5a67f537ee7f8233f82f2584cc61Automatic Updater Progress "Loading the default instance configuration ..."
cc5a9ce75af9870f2cb9e2bf00548c2f7e6398d6Automatic Updater FatalError "Missing Dependent Application - Exuberant CTags"
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater FatalError "OpenGrok Source Path ${SRC_ROOT} doesn't exist"
532d27b39244fadfcf8d8b4593f4c65434c9c664Automatic Updater Warning "Both Quiet and Verbose Mode Enabled - Choosing Verbose"
665ba746c0585088d0c314dcfc4671aa2c7b2dc1Automatic Updater Warning "OpenGrok Generated Data Path ${DATA_ROOT} doesn't exist"
9c446b72069d0ab9f710502f4d7048e50875fccbAutomatic Updater Progress " Attempting to create generated data directory ... "
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater FatalError "OpenGrok Data Path ${DATA_ROOT} doesn't exist"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater if [ ! -d "${OPENGROK_INSTANCE_BASE}/etc" ]
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater Warning "OpenGrok Generated Etc Path ${OPENGROK_INSTANCE_BASE}/etc doesn't exist"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater Progress " Attempting to create generated etc directory ... "
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater ${DO} mkdir -p "${OPENGROK_INSTANCE_BASE}/etc"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater if [ ! -d "${OPENGROK_INSTANCE_BASE}/etc" ]
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater FatalError "OpenGrok Etc Path ${OPENGROK_INSTANCE_BASE}/etc doesn't exist"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater if [ -n "${LOGGER_CONFIG_PATH}" -a ! -f "${LOGGER_CONFIG_PATH}" ]
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater Progress " Creating default ${LOGGER_CONFIG_PATH} ... "
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater Warning "Can't find distribution logging configuration" \
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater "(${LOGGER_CONF_SOURCE}) to install as default" \
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater "logging configuration (${LOGGER_CONFIG_PATH})"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater ${DO} grep -v java.util.logging.FileHandler.pattern "${LOGGER_CONF_SOURCE}" > "${LOGGER_CONFIG_PATH}"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater ${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}"
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater ${DO} ${JAVA} ${JAVA_OPTS} ${PROPERTIES} \
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater ${SCAN_FOR_REPOSITORY} ${REMOTE_REPOSITORIES} \
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater ${EXUBERANT_CTAGS:+-c} ${EXUBERANT_CTAGS} \
44e3b272904bfd85556771d30cf1bc6fa539dd03Automatic Updater ${MAX_INDEXED_WORDS} ${SKIN} ${LEADING_WILDCARD} \
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater if [ -n "${PATH_DESC}" -a -s "${PATH_DESC}" ]
75333ed9bf283dc5f93deea43460149937402985Automatic Updater ${DO} ${JAVA} -classpath ${OPENGROK_JAR} \
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater ${EFTAR_UPDATE} ${PATH_DESC} ${EFTAR_OUTPUT_FILE}
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater ${DO} ${JAVA} ${JAVA_OPTS} -jar ${OPENGROK_JAR} '-?'
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater applicationServer="`FindApplicationServerType`"
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater Tomcat) warTarget="`DetermineWarDirectoryTomcat`" ;;
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater Glassfish) warTarget="`DetermineWarDirectoryGlassfish`" ;;
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater *) FatalError "Unsupported Application Server ${applicationServer}" ;;
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater FatalError "Unable to determine Deployment Directory for ${applicationServer}"
31a540386a9abaf681d8952f1b2cdf5c75a0ba6cAutomatic Updater FatalError "Missing Web Application Archive ${OPENGROK_DIST_WAR}"
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater FatalError "Missing Deployment Directory ${warTarget}"
01f91b9cd440833f66e7476e43659655cb52ad10Automatic Updater Progress "Installing ${OPENGROK_DIST_WAR} to ${warTarget} ..."
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington ${DO} cp "${OPENGROK_DIST_WAR}" "${warTarget}/"
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington if [ $? != 0 ]
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater FatalError "Web Application Installation FAILED"
3e5b24a74c03d5b52f32d138e64e427bd2cbc8f3Automatic Updater Progress "Start your application server (${applicationServer}), if it is not already"
3e5b24a74c03d5b52f32d138e64e427bd2cbc8f3Automatic Updater Progress "running, or wait until it loads the just installed web application."
80af59ad4dcdf8370354fb45a049f1768e1a13c4Automatic Updater Progress "OpenGrok should be available on <HOST>:<PORT>/source"
789875a1bd6d50c00d3bd883cad17ead1d3c21cdMark Andrews Progress " where HOST and PORT are configured in ${applicationServer}."
ce9cad6bb04869c5e94d9dc721032b25117f9210Automatic Updater if [ -n "${2}" ]