commit | author | age
|
134a89
|
1 |
#!/bin/sh |
MM |
2 |
|
|
3 |
set -e |
|
4 |
|
|
5 |
GITBLIT_PATH=/opt/gitblit/ |
|
6 |
GITBLIT_HTTP_PORT=0 |
|
7 |
GITBLIT_HTTPS_PORT=8443 |
|
8 |
JAVA="java -server -Xmx1024M -jar" |
|
9 |
|
|
10 |
. /lib/lsb/init-functions |
|
11 |
|
|
12 |
case "$1" in |
|
13 |
start) |
|
14 |
log_action_begin_msg "Starting gitblit server" |
|
15 |
$JAVA $GITBLIT_PATH/gitblit.jar --httpsPort $GITBLIT_HTTPS_PORT --httpPort $GITBLIT_HTTP_PORT & |
|
16 |
log_action_end_msg $? |
|
17 |
;; |
|
18 |
stop) |
|
19 |
log_action_begin_msg "Stopping gitblit server" |
|
20 |
$JAVA $GITBLIT_PATH/gitblit.jar --stop & |
|
21 |
log_action_end_msg $? |
|
22 |
;; |
|
23 |
force-reload|restart) |
|
24 |
$0 stop |
|
25 |
$0 start |
|
26 |
;; |
|
27 |
*) |
|
28 |
echo "Usage: /etc/init.d/gitblit {start|stop|restart|force-reload}" |
|
29 |
exit 1 |
|
30 |
;; |
|
31 |
esac |
|
32 |
|
|
33 |
exit 0 |