Fixing command line options in init.d script
Adding missing "--host" option and fixing the declaration of other
command line options.
1 parent 2e239d1 commit 99517fa5087f9722ebf87e448b34f94ce6955da2
@Jiri Tyr Jiri Tyr authored on 21 Oct 2013
Showing 2 changed files
View
3
■■
contrib/redhat/gitbucket.conf
# Bind host
#GITBUCKET_HOST=0.0.0.0
 
# Server port
#GITBUCKET_PORT=8080
 
# Force HTTPS scheme
View
15
contrib/redhat/gitbucket.init
# Source function library
. /etc/rc.d/init.d/functions
 
# Default values
GITBUCKET_PORT=8080
GITBUCKET_HOME=/var/lib/gitbucket
GITBUCKET_WAR_FILE=/usr/share/gitbucket/lib/gitbucket.war
 
# Pull in cq settings
start() {
echo -n $"Starting GitBucket server: "
 
# Compile statup parameters
START_OPTS="--port=${GITBUCKET_PORT}"
if [ $GITBUCKET_PORT ]; then
START_OPTS="${START_OPTS} --port=${GITBUCKET_PORT}"
fi
if [ $GITBUCKET_PREFIX ]; then
START_OPTS="${START_OPTS} --prefix ${GITBUCKET_PREFIX}"
START_OPTS="${START_OPTS} --prefix=${GITBUCKET_PREFIX}"
fi
if [ $GITBUCKET_HOST ]; then
START_OPTS="${START_OPTS} --host=${GITBUCKET_HOST}"
fi
if [ $GITBUCKET_HTTPS ]; then
START_OPTS="${START_OPTS} --https=true"
fi