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