]> source.dussan.org Git - gitblit.git/commitdiff
Adjustments to init scripts
authorJames Moger <james.moger@gitblit.com>
Thu, 2 Feb 2012 22:14:43 +0000 (17:14 -0500)
committerJames Moger <james.moger@gitblit.com>
Thu, 2 Feb 2012 22:14:43 +0000 (17:14 -0500)
distrib/gitblit
distrib/gitblit-centos

index 9ae4d03c6305a6a517a8248b44a1060769a67c8c..3fda9ebdf3cee1177a7957243290719fade032b1 100644 (file)
@@ -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)
index bb69b05e3faa3d9d9c7b3c7f3074a39789a4d7c4..387d1fbfc91f61f55db16a14e3766dc4ff2dc071 100644 (file)
@@ -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