From a8d2fbd3aa7a0bb9f1c2b11933fd69b6b77d7804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Tue, 25 Sep 2018 15:09:51 +0200 Subject: [PATCH] chore: Add an ugly script to deploy easily --- deploy-ugly.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 deploy-ugly.sh diff --git a/deploy-ugly.sh b/deploy-ugly.sh new file mode 100644 index 000000000..7f2c5907f --- /dev/null +++ b/deploy-ugly.sh @@ -0,0 +1,21 @@ +#! /usr/bin/sh + +# Notes +# +# $1 (First argument) must be the stop-worlds file (e.g. en.stopwords.txt) +# +# $2 (Second argument) must be the meta file name (e.g. relaxed-colden) + +if [ $# -ne 2 ]; then + echo 'You must specify the stop-words file and the meta file name' + exit 1 +fi + +# Kill all processes that have a connection on a given port +kill -9 $(lsof -ti :3030) + +# Copy the binary to another place +cp raptor-http.bin /etc/raptor-http + +# Run the server on the a specific port and in background +/etc/raptor-http -l 0.0.0.0:3030 --stop-words $1 $2 > /dev/null 2>&1 &