Skip to content

add a new scripts to install gitblit as a service on linux #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 6, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions distrib/gitblit
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh

set -e

GITBLIT_PATH=/opt/gitblit/
GITBLIT_HTTP_PORT=0
GITBLIT_HTTPS_PORT=8443
JAVA="java -server -Xmx1024M -jar"

. /lib/lsb/init-functions

case "$1" in
start)
log_action_begin_msg "Starting gitblit server"
$JAVA $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT &
log_action_end_msg $?
;;
stop)
log_action_begin_msg "Stopping gitblit server"
$JAVA $GITBLIT_PATH/gitblit.jar --stop &
log_action_end_msg $?
;;
force-reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: /etc/init.d/gitblit {start|stop|restart|force-reload}"
exit 1
;;
esac

exit 0
3 changes: 3 additions & 0 deletions distrib/install-service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cp gitblit /etc/init.d/
chmod +x /etc/init.d/gitblit
sudo update-rc.d gitblit defaults