From d1231c63669f4bc3643985b9032de7f998612e08 Mon Sep 17 00:00:00 2001
From: Jason Pyeron <jpyeron@pdinc.us>
Date: Sun, 19 Aug 2012 21:35:52 -0400
Subject: [PATCH] fixed build to allow builds where a proxy is needed for access to outside resources see: http://ant.apache.org/manual/proxy.html

---
 distrib/gitblit |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/distrib/gitblit b/distrib/gitblit
index 9ae4d03..cd1f967 100644
--- a/distrib/gitblit
+++ b/distrib/gitblit
@@ -2,22 +2,25 @@
 
 set -e
 
-GITBLIT_PATH=/opt/gitblit/
+GITBLIT_PATH=/opt/gitblit
 GITBLIT_HTTP_PORT=0
 GITBLIT_HTTPS_PORT=8443
-JAVA="java -server -Xmx1024M -jar"
+source ${GITBLIT_PATH}/java-proxy-config.sh
+JAVA="java -server -Xmx1024M ${JAVA_PROXY_CONFIG} -Djava.awt.headless=true -jar"
 
 . /lib/lsb/init-functions
 
 case "$1" in
   start)
         log_action_begin_msg "Starting gitblit server"
-        $JAVA $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT &
+        cd $GITBLIT_PATH
+        $JAVA $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT > /dev/null &
         log_action_end_msg $?
         ;;
   stop)
         log_action_begin_msg "Stopping gitblit server"
-        $JAVA $GITBLIT_PATH/gitblit.jar --stop &
+        cd $GITBLIT_PATH
+        $JAVA $GITBLIT_PATH/gitblit.jar --stop > /dev/null &
         log_action_end_msg $?
         ;;
   force-reload|restart)

--
Gitblit v1.9.1