Enable http daemon in slave mode
Also add the --headless option to make sure Gerrit isn't even trying
to serve the UI.
For historical reasons, http daemon wasn't enabled in the slave mode.
A reason for that is that, in Gerrit's early versions, it wasn't
possible to both run the http daemon and not serve the UI.
Slaves are read-only and disposable. They are used for two purposes:
* reduce latency on remote sites
* off-load clone/fetch traffic from Gerrit master
Git/HTTP is the best protocol to allow a flexible allocation of slaves,
because supports proxying and URL-based redirection.
Change-Id: Ic5568b4e8e005d660a9f61931831c39d270a9ef1
diff --git a/resources/com/google/gerrit/pgm/init/gerrit.sh b/resources/com/google/gerrit/pgm/init/gerrit.sh
index 20edbd3..5571e7c 100755
--- a/resources/com/google/gerrit/pgm/init/gerrit.sh
+++ b/resources/com/google/gerrit/pgm/init/gerrit.sh
@@ -346,7 +346,7 @@
test -z "$GERRIT_USER" && GERRIT_USER=`whoami`
RUN_ARGS="-jar $GERRIT_WAR daemon -d $GERRIT_SITE"
if test "`get_config --bool container.slave`" = "true" ; then
- RUN_ARGS="$RUN_ARGS --slave"
+ RUN_ARGS="$RUN_ARGS --slave --enable-httpd --headless"
fi
DAEMON_OPTS=`get_config --get-all container.daemonOpt`
if test -n "$DAEMON_OPTS" ; then