blob: 20731819841724f60c3e1bf12681cdbd1bcf36c1 [file] [log] [blame]
Giorgi Lekveishvili285ab622023-11-22 13:50:45 +04001#!/bin/ash
2GERRIT_DAEMON_OPTS="--console-log --enable-httpd"
3
4IS_REPLICA=$(git config -f /var/gerrit/etc/gerrit.config --get container.replica)
5if [[ "$IS_REPLICA" == "true" ]]; then
6 GERRIT_DAEMON_OPTS="$GERRIT_DAEMON_OPTS --replica"
7fi
8
9JAVA_OPTIONS=$(git config --file /var/gerrit/etc/gerrit.config --get-all container.javaOptions)
10JAVA_OPTIONS="$JAVA_OPTIONS -Dgerrit.instanceId=$POD_NAME"
11java ${JAVA_OPTIONS} -jar /var/gerrit/bin/gerrit.war daemon \
12 -d /var/gerrit \
13 $GERRIT_DAEMON_OPTS