Преглед изворни кода

Added install and uninstall scripts.

Winston Li пре 12 година
родитељ
комит
0438e501f9
3 измењених фајлова са 16 додато и 1 уклоњено
  1. 1 1
      services/git-bridge/build.xml
  2. 8 0
      services/git-bridge/install.sh
  3. 7 0
      services/git-bridge/uninstall.sh

+ 1 - 1
services/git-bridge/build.xml

@@ -282,7 +282,7 @@
   </target>
   
   <target name="clean" depends="clean.modules" description="cleanup all">
-      <delete dir="${module.writelatex-git-bridge.basedir}/bin" />
+      <delete dir="${module.writelatex-git-bridge.basedir}/bin/writelatex-git-bridge.jar" />
   </target>
   
   <target name="build.modules" depends="init, clean, compile.module.writelatex-git-bridge" description="build all modules"/>

+ 8 - 0
services/git-bridge/install.sh

@@ -0,0 +1,8 @@
+if [ "$(id -u)" != "0" ]; then
+	echo "You must be root to install" 1>&2
+	exit 1
+fi
+ant all &&\
+cp ./bin/writelatex-git-bridge.jar /usr/local/sbin/ &&\
+cp ./bin/wlgb /etc/init.d/ &&\
+/usr/sbin/update-rc.d -f wlgb defaults

+ 7 - 0
services/git-bridge/uninstall.sh

@@ -0,0 +1,7 @@
+if [ "$(id -u)" != "0" ]; then
+	echo "You must be root to uninstall" 1>&2
+	exit 1
+fi
+rm -f /usr/local/sbin/writelatex-git-bridge.jar &&\
+rm -f /etc/init.d/wlgb &&\
+/usr/sbin/update-rc.d -f wlgb remove