Просмотр исходного кода

Added .json config file to installation.

Winston Li 12 лет назад
Родитель
Сommit
c9df3e23ec

+ 5 - 0
services/git-bridge/bin/config.json

@@ -0,0 +1,5 @@
+{
+	"port": 80,
+	"rootGitDirectory": "/var/wlgb/git",
+	"apiKey": ""
+}

+ 4 - 0
services/git-bridge/bin/wlgb

@@ -57,6 +57,10 @@ do_start()
 	start-stop-daemon --start --quiet --make-pidfile --pidfile $PIDFILE --exec $DAEMON -- \
 		$DAEMON_ARGS >> /var/log/wlgb/out.log 2>> /var/log/err.log &
 	echo "WriteLatex-Git Bridge started."
+	echo "Config file at /etc/wlgb/config.json"
+	echo "Log file at /var/log/wlgb/out.log"
+	echo "Error file at /var/log/err.log"
+	echo 
 	return 0
 	# Add code here, if necessary, that waits for the process to be ready
 	# to handle requests from services started subsequently which depend

+ 3 - 1
services/git-bridge/install.sh

@@ -6,5 +6,7 @@ command -v ant >/dev/null 2>&1 && command -v /usr/lib/jvm/java-7-openjdk-amd64/b
 ant all &&\
 mv ./bin/writelatex-git-bridge.jar /usr/local/sbin/ &&\
 cp ./bin/wlgb /etc/init.d/ &&\
-mkdir /var/log/wlgb
+mkdir /var/log/wlgb &&\
+mkdir /etc/wlgb
+cp ./bin/config.json /etc/wlgb/
 /usr/sbin/update-rc.d -f wlgb defaults