From 02ede7f11c6fb28ca53fc240905cd1b140236f08 Mon Sep 17 00:00:00 2001
From: Robin Rosenberg <robin.rosenberg@dewire.com>
Date: Sun, 01 Sep 2013 13:58:00 -0400
Subject: [PATCH] Avoid NPE when the default branch cannot be identified

---
 src/main/distrib/linux/service-ubuntu.sh |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/src/main/distrib/linux/service-ubuntu.sh b/src/main/distrib/linux/service-ubuntu.sh
index 4ff275d..f21ec2a 100644
--- a/src/main/distrib/linux/service-ubuntu.sh
+++ b/src/main/distrib/linux/service-ubuntu.sh
@@ -1,6 +1,14 @@
 #!/bin/bash
-# chkconfig: 3 21 91
-# Source function library.
+### BEGIN INIT INFO
+# Provides:          gitblit
+# Required-Start:    $remote_fs $syslog $network
+# Required-Stop:     $remote_fs $syslog $network
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: Gitblit repository server
+# Description:       Gitblit is a stand-alone service for managing, viewing and serving Git repositories.
+### END INIT INFO
+
 . /lib/init/vars.sh
 . /lib/lsb/init-functions
 
@@ -36,6 +44,7 @@
   
   force-reload|restart)
       $0 stop
+      sleep 5
       $0 start
   ;;
 

--
Gitblit v1.9.1