mirror of
https://github.com/gitbucket/gitbucket.git
synced 2026-01-03 06:09:58 +01:00
Works under Ubuntu and Mac OS/X
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ restart() {
|
||||
start
|
||||
}
|
||||
|
||||
|
||||
## MacOS proxies for System V service hooks:
|
||||
StartService() {
|
||||
start
|
||||
}
|
||||
@@ -135,3 +135,4 @@ else
|
||||
esac
|
||||
exit $RETVAL
|
||||
fi
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user