From 08e29e7077dc2a90a53beec2d929debdbb63624c Mon Sep 17 00:00:00 2001 From: Mike Slinn Date: Mon, 28 Jul 2014 10:10:27 -0700 Subject: [PATCH 1/5] Added install script, made existing RedHat init script also work with Ubuntu --- contrib/README.md | 6 +++++ contrib/redhat/gitbucket.conf | 41 +++++++++++++++++++---------- contrib/redhat/gitbucket.init | 32 ++++++++++++++++------- contrib/redhat/install | 49 +++++++++++++++++++++++++++++++++++ 4 files changed, 104 insertions(+), 24 deletions(-) create mode 100644 contrib/README.md create mode 100755 contrib/redhat/install diff --git a/contrib/README.md b/contrib/README.md new file mode 100644 index 000000000..38b089908 --- /dev/null +++ b/contrib/README.md @@ -0,0 +1,6 @@ +# Contrib Notes # +RedHat directory also contains scripts for Ubuntu, and the configuration adapts according to the OS. +Ideally the Mac scripts would also be folded in as well. + +This version of scripts has so far only been tested on Ubuntu. I'll test on Mac also, but someone else will have to test on RedHat. + diff --git a/contrib/redhat/gitbucket.conf b/contrib/redhat/gitbucket.conf index 103778ec6..e8a5e3d29 100644 --- a/contrib/redhat/gitbucket.conf +++ b/contrib/redhat/gitbucket.conf @@ -1,17 +1,30 @@ # Bind host -#GITBUCKET_HOST=0.0.0.0 - -# Server port -#GITBUCKET_PORT=8080 - -# Data directory (GITBUCKET_HOME/gitbucket) -#GITBUCKET_HOME=/var/lib/gitbucket - -# Path to the WAR file -#GITBUCKET_WAR_FILE=/usr/share/gitbucket/lib/gitbucket.war - -# URL prefix for the GitBucket page (http://://) -#GITBUCKET_PREFIX= +GITBUCKET_HOST=0.0.0.0 # Other Java option -#GITBUCKET_JVM_OPTS= +GITBUCKET_JVM_OPTS= + +# Data directory, holds repositories +GITBUCKET_HOME=/var/lib/gitbucket + +GITBUCKET_LOG_DIR=/var/log/gitbucket + +# Server port +GITBUCKET_PORT=8080 + +# URL prefix for the GitBucket page (http://://) +GITBUCKET_PREFIX= + +# Directory where GitBucket is installed +# Configuration is stored here: +GITBUCKET_DIR=/usr/share/gitbucket +GITBUCKET_WAR_DIR=$GITBUCKET_DIR/lib + +# Path to the WAR file +GITBUCKET_WAR_FILE=$GITBUCKET_WAR_DIR/gitbucket.war + +# RedHat prefers /etc/rc.d/init.d +GITBUCKET_SERVICE=/etc/init.d/gitbucket + +# GitBucket version to fetch when installing +GITBUCKET_VERSION=2.1 diff --git a/contrib/redhat/gitbucket.init b/contrib/redhat/gitbucket.init index 43e29e3e9..d81185003 100644 --- a/contrib/redhat/gitbucket.init +++ b/contrib/redhat/gitbucket.init @@ -1,6 +1,7 @@ #!/bin/bash # -# /etc/rc.d/init.d/gitbucket +# RedHat: /etc/rc.d/init.d/gitbucket +# Ubuntu: /etc/init.d/gitbucket # # Starts the GitBucket server # @@ -8,28 +9,41 @@ # description: Run GitBucket server # processname: java -# Source function library -. /etc/rc.d/init.d/functions +[ -f /etc/rc.d/init.d/functions ] && source /etc/rc.d/init.d/functions # Default values GITBUCKET_HOME=/var/lib/gitbucket GITBUCKET_WAR_FILE=/usr/share/gitbucket/lib/gitbucket.war # Pull in cq settings -[ -f /etc/sysconfig/gitbucket ] && . /etc/sysconfig/gitbucket +[ -f /etc/sysconfig/gitbucket ] && source /etc/sysconfig/gitbucket +[ -f $GITBUCKET_DIR/gitbucket.conf ] && source $GITBUCKET_DIR/gitbucket.conf # added for non-redhat systems # Location of the log and PID file -LOG_FILE=/var/log/gitbucket/run.log +LOG_FILE=$GITBUCKET_LOG_DIR/run.log PID_FILE=/var/run/gitbucket.pid # Default return value RETVAL=0 +RED='\033[1m\E[37;41m' +GREEN='\033[1m\E[37;42m' +OFF='\E[0m' + +if [ -z "$(which success)" ]; then + function success { + printf "%b\n" "$GREEN $* $OFF" + } +fi +if [ -z "$(which failure)" ]; then + function failure { + printf "%b\n" "$RED $* $OFF" + } +fi start() { echo -n $"Starting GitBucket server: " - # Compile statup parameters if [ $GITBUCKET_PORT ]; then START_OPTS="${START_OPTS} --port=${GITBUCKET_PORT}" fi @@ -40,17 +54,15 @@ start() { START_OPTS="${START_OPTS} --host=${GITBUCKET_HOST}" fi - # Run the Java process GITBUCKET_HOME="${GITBUCKET_HOME}" java $GITBUCKET_JVM_OPTS -jar $GITBUCKET_WAR_FILE $START_OPTS >>$LOG_FILE 2>&1 & RETVAL=$? - # Store PID of the Java process into a file echo $! > $PID_FILE if [ $RETVAL -eq 0 ] ; then - success "GitBucket startup" + success "Success" else - failure "GitBucket startup" + failure "Exit code $RETVAL" fi echo diff --git a/contrib/redhat/install b/contrib/redhat/install new file mode 100755 index 000000000..87690a437 --- /dev/null +++ b/contrib/redhat/install @@ -0,0 +1,49 @@ +#!/bin/bash + +# Only tested on Ubuntu 14.04 + +# Uses information stored in GitBucket git repo on GitHub as defaults. +# Edit gitbucket.conf before running this script + +GITBUCKET_VERSION=2.1 +source gitbucket.conf + +function createDir { + if [ ! -d "$1" ]; then + echo "Making $1 directory." + sudo mkdir -p "$1" + fi +} + +if [ ! -d "/etc/init.d/" ]; then + echo "/etc/init.d/ does not exist. This script requires System V init script compatibility." + exit -1 +fi + +if [ "$(which iptables)" ]; then + echo "Opening port $GITBUCKET_PORT in firewall." + sudo iptables -A INPUT -p tcp --dport $GITBUCKET_PORT -j ACCEPT +fi + +createDir "$GITBUCKET_HOME" +createDir "$GITBUCKET_WAR_DIR" +createDir "$GITBUCKET_DIR" +createDir "$GITBUCKET_LOG_DIR" + +echo "Fetching GitBucket v$GITBUCKET_VERSION and saving as $GITBUCKET_WAR_FILE" +sudo wget -qO "$GITBUCKET_WAR_FILE" https://github.com/takezoe/gitbucket/releases/download/$GITBUCKET_VERSION/gitbucket.war + +# Install gitbucket as a service that starts when system boots +sudo cp gitbucket.init "$GITBUCKET_SERVICE" +echo "Copying gitbucket.conf to $GITBUCKET_DIR" +sudo cp gitbucket.conf $GITBUCKET_DIR +sudo chown root:root $GITBUCKET_SERVICE +sudo chmod 755 $GITBUCKET_SERVICE +sudo update-rc.d $GITBUCKET_SERVICE defaults + +echo "Starting GitBucket service" +sudo rm -f "$GITBUCKET_LOG_DIR/run.log" +sudo $GITBUCKET_SERVICE start +if [ $? != 0 ]; then + less "$GITBUCKET_LOG_DIR/run.log" +fi \ No newline at end of file From a0fbb90048966c29e793afed6913630654a91144 Mon Sep 17 00:00:00 2001 From: Mike Slinn Date: Tue, 29 Jul 2014 00:18:09 -0700 Subject: [PATCH 2/5] Works on Mac, need to retest on Ubuntu --- contrib/README.md | 12 +++- contrib/gitbucket.conf | 52 +++++++++++++++ contrib/{redhat => }/gitbucket.init | 63 ++++++++++++------- contrib/{redhat => }/install | 45 ++++++++----- contrib/{ => linux}/redhat/gitbucket.spec | 0 contrib/macosx/{gitbucket.plist => makePlist} | 14 ++++- contrib/redhat/gitbucket.conf | 30 --------- 7 files changed, 143 insertions(+), 73 deletions(-) create mode 100644 contrib/gitbucket.conf rename contrib/{redhat => }/gitbucket.init (75%) rename contrib/{redhat => }/install (54%) rename contrib/{ => linux}/redhat/gitbucket.spec (100%) rename contrib/macosx/{gitbucket.plist => makePlist} (56%) mode change 100644 => 100755 delete mode 100644 contrib/redhat/gitbucket.conf diff --git a/contrib/README.md b/contrib/README.md index 38b089908..c0241cee7 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -1,6 +1,12 @@ # Contrib Notes # -RedHat directory also contains scripts for Ubuntu, and the configuration adapts according to the OS. -Ideally the Mac scripts would also be folded in as well. -This version of scripts has so far only been tested on Ubuntu. I'll test on Mac also, but someone else will have to test on RedHat. +The configuration adapts according to the OS. +Linux directory contains scripts for Ubuntu and RedHat. +The Mac scripts have been folded in as well. +Common scripts are in this directory. +This version of scripts has so far only been tested on Ubuntu and Mac. Someone else will have to test on RedHat. + +To run, type: + + install \ No newline at end of file diff --git a/contrib/gitbucket.conf b/contrib/gitbucket.conf new file mode 100644 index 000000000..d747b45f6 --- /dev/null +++ b/contrib/gitbucket.conf @@ -0,0 +1,52 @@ +function isUbuntu { + if [ -f /etc/lsb-release ]; then + grep -i ubuntu /etc/lsb-release | head -n 1 | cut -d \ -f 1 | cut -d = -f 2 + fi +} + +function isRedHat { + if [ -d "/etc/rc.d/init.d" ]; then echo yes; fi +} + +function isMac { + if [[ "$(uname -a | cut -d \ -f 1 )" == "Darwin" ]]; then echo yes; fi +} + +# Bind host +GITBUCKET_HOST=0.0.0.0 + +# Other Java option +GITBUCKET_JVM_OPTS=-Dmail.smtp.starttls.enable=true + +# Data directory, holds repositories +GITBUCKET_HOME=/var/lib/gitbucket + +GITBUCKET_LOG_DIR=/var/log/gitbucket + +# Server port +GITBUCKET_PORT=8080 + +# URL prefix for the GitBucket page (http://://) +GITBUCKET_PREFIX= + +# Directory where GitBucket is installed +# Configuration is stored here: +GITBUCKET_DIR=/usr/share/gitbucket +GITBUCKET_WAR_DIR=$GITBUCKET_DIR/lib + +# Path to the WAR file +GITBUCKET_WAR_FILE=$GITBUCKET_WAR_DIR/gitbucket.war + +# GitBucket version to fetch when installing +GITBUCKET_VERSION=2.1 + +if [ `isUbuntu` ]; then + GITBUCKET_SERVICE=/etc/init.d/gitbucket +elif [ `isRedHat` ]; then + GITBUCKET_SERVICE=/etc/rc.d/init.d +elif [ `isMac` ]; then + GITBUCKET_SERVICE=/Library/StartupItems/GitBucket/GitBucket +else + echo "Don't know how to install onto this OS" + exit -2 +fi diff --git a/contrib/redhat/gitbucket.init b/contrib/gitbucket.init similarity index 75% rename from contrib/redhat/gitbucket.init rename to contrib/gitbucket.init index d81185003..a57849467 100644 --- a/contrib/redhat/gitbucket.init +++ b/contrib/gitbucket.init @@ -2,6 +2,7 @@ # # RedHat: /etc/rc.d/init.d/gitbucket # Ubuntu: /etc/init.d/gitbucket +# Mac OS/X: /Library/StartupItems/GitBucket # # Starts the GitBucket server # @@ -9,23 +10,23 @@ # description: Run GitBucket server # processname: java -[ -f /etc/rc.d/init.d/functions ] && source /etc/rc.d/init.d/functions +set -e + +[ -f /etc/rc.d/init.d/functions ] && source /etc/rc.d/init.d/functions # RedHat +[ -f /etc/rc.common ] && source /etc/rc.common # Mac OS/X # Default values GITBUCKET_HOME=/var/lib/gitbucket GITBUCKET_WAR_FILE=/usr/share/gitbucket/lib/gitbucket.war # Pull in cq settings -[ -f /etc/sysconfig/gitbucket ] && source /etc/sysconfig/gitbucket -[ -f $GITBUCKET_DIR/gitbucket.conf ] && source $GITBUCKET_DIR/gitbucket.conf # added for non-redhat systems +[ -f /etc/sysconfig/gitbucket ] && source /etc/sysconfig/gitbucket # RedHat +[ -f gitbucket.conf ] && source gitbucket.conf # For all systems # Location of the log and PID file LOG_FILE=$GITBUCKET_LOG_DIR/run.log PID_FILE=/var/run/gitbucket.pid -# Default return value -RETVAL=0 - RED='\033[1m\E[37;41m' GREEN='\033[1m\E[37;42m' OFF='\E[0m' @@ -41,9 +42,12 @@ if [ -z "$(which failure)" ]; then } fi +RETVAL=0 + start() { echo -n $"Starting GitBucket server: " + START_OPTS= if [ $GITBUCKET_PORT ]; then START_OPTS="${START_OPTS} --port=${GITBUCKET_PORT}" fi @@ -95,24 +99,39 @@ restart() { } -case "$1" in -start) +StartService() { start - ;; -stop) +} + +StopService() { stop - ;; -restart) +} + +RestartService() { restart - ;; -status) - status -p $PID_FILE java - RETVAL=$? - ;; -*) - echo $"Usage: $0 [start|stop|restart|status]" - RETVAL=2 -esac +} -exit $RETVAL +if [ `isMac` ]; then + RunService "$1" +else + case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + status) + status -p $PID_FILE java + RETVAL=$? + ;; + *) + echo $"Usage: $0 [start|stop|restart|status]" + RETVAL=2 + esac + exit $RETVAL +fi diff --git a/contrib/redhat/install b/contrib/install similarity index 54% rename from contrib/redhat/install rename to contrib/install index 87690a437..136fbcd5d 100755 --- a/contrib/redhat/install +++ b/contrib/install @@ -3,9 +3,16 @@ # Only tested on Ubuntu 14.04 # Uses information stored in GitBucket git repo on GitHub as defaults. -# Edit gitbucket.conf before running this script +# Edit gitbucket.conf before running this + +set -e GITBUCKET_VERSION=2.1 + +if [ ! -f gitbucket.conf ]; then + echo "gitbucket.conf not found, aborting" + exit -3 +fi source gitbucket.conf function createDir { @@ -15,11 +22,6 @@ function createDir { fi } -if [ ! -d "/etc/init.d/" ]; then - echo "/etc/init.d/ does not exist. This script requires System V init script compatibility." - exit -1 -fi - if [ "$(which iptables)" ]; then echo "Opening port $GITBUCKET_PORT in firewall." sudo iptables -A INPUT -p tcp --dport $GITBUCKET_PORT -j ACCEPT @@ -33,17 +35,30 @@ createDir "$GITBUCKET_LOG_DIR" echo "Fetching GitBucket v$GITBUCKET_VERSION and saving as $GITBUCKET_WAR_FILE" sudo wget -qO "$GITBUCKET_WAR_FILE" https://github.com/takezoe/gitbucket/releases/download/$GITBUCKET_VERSION/gitbucket.war -# Install gitbucket as a service that starts when system boots -sudo cp gitbucket.init "$GITBUCKET_SERVICE" +sudo rm -f "$GITBUCKET_LOG_DIR/run.log" + echo "Copying gitbucket.conf to $GITBUCKET_DIR" sudo cp gitbucket.conf $GITBUCKET_DIR -sudo chown root:root $GITBUCKET_SERVICE -sudo chmod 755 $GITBUCKET_SERVICE -sudo update-rc.d $GITBUCKET_SERVICE defaults +if [ `isUbuntu` ] || [ `isRedHat` ]; then + sudo cp gitbucket.init "$GITBUCKET_SERVICE" + # Install gitbucket as a service that starts when system boots + sudo chown root:root $GITBUCKET_SERVICE + sudo chmod 755 $GITBUCKET_SERVICE + sudo update-rc.d $GITBUCKET_SERVICE defaults + echo "Starting GitBucket service" + sudo $GITBUCKET_SERVICE start +elif [ `isMac` ]; then + sudo macosx/makePlist + echo "Starting GitBucket service" + sudo cp gitbucket.conf "$GITBUCKET_SERVICE" + sudo cp gitbucket.init "$GITBUCKET_SERVICE" + sudo chmod a+x "$GITBUCKET_SERVICE" + sudo "$GITBUCKET_SERVICE" start +else + echo "Don't know how to install this OS" + exit -2 +fi -echo "Starting GitBucket service" -sudo rm -f "$GITBUCKET_LOG_DIR/run.log" -sudo $GITBUCKET_SERVICE start if [ $? != 0 ]; then less "$GITBUCKET_LOG_DIR/run.log" -fi \ No newline at end of file +fi diff --git a/contrib/redhat/gitbucket.spec b/contrib/linux/redhat/gitbucket.spec similarity index 100% rename from contrib/redhat/gitbucket.spec rename to contrib/linux/redhat/gitbucket.spec diff --git a/contrib/macosx/gitbucket.plist b/contrib/macosx/makePlist old mode 100644 new mode 100755 similarity index 56% rename from contrib/macosx/gitbucket.plist rename to contrib/macosx/makePlist index 827c15a1d..3f874ef8e --- a/contrib/macosx/gitbucket.plist +++ b/contrib/macosx/makePlist @@ -1,3 +1,10 @@ +#!/bin/bash + +# From http://docstore.mik.ua/orelly/unix3/mac/ch02_02.htm +source gitbucket.conf +GITBUCKET_SERVICE_DIR=`dirname "$GITBUCKET_SERVICE"` +mkdir -p "$GITBUCKET_SERVICE_DIR" +cat << EOF > "$GITBUCKET_SERVICE_DIR/gitbucket.plist" @@ -7,14 +14,15 @@ ProgramArguments /usr/bin/java - -Dmail.smtp.starttls.enable=true + $GITBUCKET_JVM_OPTS -jar gitbucket.war - --host=127.0.0.1 - --port=8080 + --host=$GITBUCKET_HOST + --port=$GITBUCKET_PORT --https=true RunAtLoad +EOF \ No newline at end of file diff --git a/contrib/redhat/gitbucket.conf b/contrib/redhat/gitbucket.conf deleted file mode 100644 index e8a5e3d29..000000000 --- a/contrib/redhat/gitbucket.conf +++ /dev/null @@ -1,30 +0,0 @@ -# Bind host -GITBUCKET_HOST=0.0.0.0 - -# Other Java option -GITBUCKET_JVM_OPTS= - -# Data directory, holds repositories -GITBUCKET_HOME=/var/lib/gitbucket - -GITBUCKET_LOG_DIR=/var/log/gitbucket - -# Server port -GITBUCKET_PORT=8080 - -# URL prefix for the GitBucket page (http://://) -GITBUCKET_PREFIX= - -# Directory where GitBucket is installed -# Configuration is stored here: -GITBUCKET_DIR=/usr/share/gitbucket -GITBUCKET_WAR_DIR=$GITBUCKET_DIR/lib - -# Path to the WAR file -GITBUCKET_WAR_FILE=$GITBUCKET_WAR_DIR/gitbucket.war - -# RedHat prefers /etc/rc.d/init.d -GITBUCKET_SERVICE=/etc/init.d/gitbucket - -# GitBucket version to fetch when installing -GITBUCKET_VERSION=2.1 From 6d200aa3408699a6007577e484deb4fa6e48609e Mon Sep 17 00:00:00 2001 From: Mike Slinn Date: Tue, 29 Jul 2014 07:28:44 -0700 Subject: [PATCH 3/5] Works under Ubuntu and Mac OS/X --- contrib/README.md | 9 +++++---- contrib/gitbucket.conf | 10 ++++++++++ contrib/gitbucket.init | 3 ++- contrib/install | 2 +- 4 files changed, 18 insertions(+), 6 deletions(-) diff --git a/contrib/README.md b/contrib/README.md index c0241cee7..1121a224a 100644 --- a/contrib/README.md +++ b/contrib/README.md @@ -1,12 +1,13 @@ # Contrib Notes # -The configuration adapts according to the OS. -Linux directory contains scripts for Ubuntu and RedHat. +The configuration script adapts according to the OS. +The `linux` directory contains scripts for Ubuntu and RedHat. The Mac scripts have been folded in as well. Common scripts are in this directory. This version of scripts has so far only been tested on Ubuntu and Mac. Someone else will have to test on RedHat. -To run, type: +To run: +1. Edit `gitbucket.conf` to suit. +2. Type: `install` - install \ No newline at end of file diff --git a/contrib/gitbucket.conf b/contrib/gitbucket.conf index d747b45f6..ead333196 100644 --- a/contrib/gitbucket.conf +++ b/contrib/gitbucket.conf @@ -1,3 +1,5 @@ +# Configuration section is below. Ignore this part + function isUbuntu { if [ -f /etc/lsb-release ]; then grep -i ubuntu /etc/lsb-release | head -n 1 | cut -d \ -f 1 | cut -d = -f 2 @@ -12,6 +14,10 @@ function isMac { if [[ "$(uname -a | cut -d \ -f 1 )" == "Darwin" ]]; then echo yes; fi } +# +# Configuration section start +# + # Bind host GITBUCKET_HOST=0.0.0.0 @@ -40,6 +46,9 @@ GITBUCKET_WAR_FILE=$GITBUCKET_WAR_DIR/gitbucket.war # GitBucket version to fetch when installing GITBUCKET_VERSION=2.1 +# +# End of configuration section. Ignore this part +# if [ `isUbuntu` ]; then GITBUCKET_SERVICE=/etc/init.d/gitbucket elif [ `isRedHat` ]; then @@ -50,3 +59,4 @@ else echo "Don't know how to install onto this OS" exit -2 fi + diff --git a/contrib/gitbucket.init b/contrib/gitbucket.init index a57849467..067564617 100644 --- a/contrib/gitbucket.init +++ b/contrib/gitbucket.init @@ -98,7 +98,7 @@ restart() { start } - +## MacOS proxies for System V service hooks: StartService() { start } @@ -135,3 +135,4 @@ else esac exit $RETVAL fi + diff --git a/contrib/install b/contrib/install index 136fbcd5d..a51eb65b6 100755 --- a/contrib/install +++ b/contrib/install @@ -44,7 +44,7 @@ if [ `isUbuntu` ] || [ `isRedHat` ]; then # Install gitbucket as a service that starts when system boots sudo chown root:root $GITBUCKET_SERVICE sudo chmod 755 $GITBUCKET_SERVICE - sudo update-rc.d $GITBUCKET_SERVICE defaults + sudo update-rc.d "$(basename $GITBUCKET_SERVICE)" defaults echo "Starting GitBucket service" sudo $GITBUCKET_SERVICE start elif [ `isMac` ]; then From 6a2d2ebfd160d2e47dffec056390bef8b1c7d861 Mon Sep 17 00:00:00 2001 From: Mike Slinn Date: Tue, 29 Jul 2014 15:44:43 -0700 Subject: [PATCH 4/5] Added help info for user about making iptables changes persistent --- contrib/install | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/install b/contrib/install index a51eb65b6..375a06348 100755 --- a/contrib/install +++ b/contrib/install @@ -25,6 +25,11 @@ function createDir { if [ "$(which iptables)" ]; then echo "Opening port $GITBUCKET_PORT in firewall." sudo iptables -A INPUT -p tcp --dport $GITBUCKET_PORT -j ACCEPT + echo "Please use iptables-persistent:" + echo " sudo apt-get install iptables-persistent" + echo "After installed, you can save/reload iptables rules anytime:" + echo " sudo /etc/init.d/iptables-persistent save" + echo " sudo /etc/init.d/iptables-persistent reload" fi createDir "$GITBUCKET_HOME" From 193a312b226ab5f069d19a70e2c07c1620cc4341 Mon Sep 17 00:00:00 2001 From: Mike Slinn Date: Tue, 29 Jul 2014 15:49:48 -0700 Subject: [PATCH 5/5] Made gitbucket run on system startup and stop on shutdown --- contrib/install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/install b/contrib/install index 375a06348..860b02fcb 100755 --- a/contrib/install +++ b/contrib/install @@ -49,7 +49,7 @@ if [ `isUbuntu` ] || [ `isRedHat` ]; then # Install gitbucket as a service that starts when system boots sudo chown root:root $GITBUCKET_SERVICE sudo chmod 755 $GITBUCKET_SERVICE - sudo update-rc.d "$(basename $GITBUCKET_SERVICE)" defaults + sudo update-rc.d "$(basename $GITBUCKET_SERVICE)" defaults 98 02 echo "Starting GitBucket service" sudo $GITBUCKET_SERVICE start elif [ `isMac` ]; then