From: James Moger Date: Thu, 2 Feb 2012 22:14:43 +0000 (-0500) Subject: Adjustments to init scripts X-Git-Tag: v0.9.0~120 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=a71c5a27e3768cb68b979eac6ec8c7d7612dec8f;p=gitblit.git Adjustments to init scripts --- diff --git a/distrib/gitblit b/distrib/gitblit index 9ae4d03c..3fda9ebd 100644 --- a/distrib/gitblit +++ b/distrib/gitblit @@ -2,7 +2,7 @@ set -e -GITBLIT_PATH=/opt/gitblit/ +GITBLIT_PATH=/opt/gitblit GITBLIT_HTTP_PORT=0 GITBLIT_HTTPS_PORT=8443 JAVA="java -server -Xmx1024M -jar" @@ -12,12 +12,14 @@ JAVA="java -server -Xmx1024M -jar" case "$1" in start) log_action_begin_msg "Starting gitblit server" - $JAVA $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT & + cd $GITBLIT_PATH + $JAVA $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT > /dev/null & log_action_end_msg $? ;; stop) log_action_begin_msg "Stopping gitblit server" - $JAVA $GITBLIT_PATH/gitblit.jar --stop & + cd $GITBLIT_PATH + $JAVA $GITBLIT_PATH/gitblit.jar --stop > /dev/null & log_action_end_msg $? ;; force-reload|restart) diff --git a/distrib/gitblit-centos b/distrib/gitblit-centos index bb69b05e..387d1fbf 100644 --- a/distrib/gitblit-centos +++ b/distrib/gitblit-centos @@ -16,6 +16,7 @@ case "$1" in if [ -f $GITBLIT_PATH/gitblit.jar ]; then echo $"Starting gitblit server" + cd $GITBLIT_PATH $JAVA $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT > /dev/null & echo "." exit $RETVAL @@ -26,6 +27,7 @@ case "$1" in if [ -f $GITBLIT_PATH/gitblit.jar ]; then echo $"Stopping gitblit server" + cd $GITBLIT_PATH $JAVA $GITBLIT_PATH/gitblit.jar --stop > /dev/null & echo "." exit $RETVAL