#!/bin/ash | |
IS_REPLICA=$(git config -f /var/gerrit/etc/gerrit.config --get container.replica) | |
if [[ ! "$IS_REPLICA" == "true" ]]; then | |
echo "container.replica in gerrit.config has to be true" | |
exit 1 | |
fi | |
# workaround gerrit.sh does not start httpd | |
JAVA_OPTIONS=$(git config --file /var/gerrit/etc/gerrit.config --get-all container.javaOptions) | |
java ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war daemon \ | |
-d /var/gerrit \ | |
--enable-httpd \ | |
--console-log \ | |
--replica |