From c9df3e23ecd0ef4193b2669abc1019500e16ba2e Mon Sep 17 00:00:00 2001 From: Winston Li Date: Fri, 5 Dec 2014 22:39:07 +0000 Subject: [PATCH] Added .json config file to installation. --- services/git-bridge/bin/config.json | 5 +++++ services/git-bridge/bin/wlgb | 4 ++++ services/git-bridge/install.sh | 4 +++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 services/git-bridge/bin/config.json diff --git a/services/git-bridge/bin/config.json b/services/git-bridge/bin/config.json new file mode 100644 index 0000000000..8f84bc94a8 --- /dev/null +++ b/services/git-bridge/bin/config.json @@ -0,0 +1,5 @@ +{ + "port": 80, + "rootGitDirectory": "/var/wlgb/git", + "apiKey": "" +} diff --git a/services/git-bridge/bin/wlgb b/services/git-bridge/bin/wlgb index 1d25f66a4b..fd6e1f3eb0 100755 --- a/services/git-bridge/bin/wlgb +++ b/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 diff --git a/services/git-bridge/install.sh b/services/git-bridge/install.sh index 79284fcdd9..d5ae9934ce 100755 --- a/services/git-bridge/install.sh +++ b/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