Added install and uninstall scripts.

This commit is contained in:
Winston Li 2014-12-05 20:38:12 +00:00
parent 08583e470d
commit 0438e501f9
3 changed files with 16 additions and 1 deletions

View file

@ -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
services/git-bridge/install.sh Executable file
View file

@ -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

View file

@ -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