Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Init and start Gerrit in a single shell script example
#!/bin/sh -ex
# Because Gerrit's "daemon --init" can't take init options we will do this
# separately. Feature request filed:
# Init site (provision). Note that the GERRIT_WAR may be a different version
# than the one in "${SITE_PATH}/bin/gerrit.war".
java ${JAVA_OPTIONS} -jar ${GERRIT_WAR} init \
--site-path "${SITE_PATH}" \
--batch \
--no-auto-start \
--install-all-plugins \
# Run daemon in foreground with 'exec' to pass signals.
exec java ${JAVA_OPTIONS} -jar "${SITE_PATH}/bin/gerrit.war" daemon \
--site-path "${SITE_PATH}" \
--console-log \
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.