File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
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
Original file line number Diff line number Diff line change
1
+ cp gitblit /etc/init.d/
2
+ chmod +x /etc/init.d/gitblit
3
+ sudo update-rc.d gitblit defaults
You can’t perform that action at this time.
0 commit comments