From 8d34c3335f00473b35b265cccd9e0ff34787d736 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sun, 16 May 2021 10:41:17 +0100 Subject: [PATCH] Add contrib/run-from-source.sh This allows for running the three components without first installing them in any manner. You can just git clone, configure (including certificate files) and go. --- contrib/run-from-source.sh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 contrib/run-from-source.sh diff --git a/contrib/run-from-source.sh b/contrib/run-from-source.sh new file mode 100644 index 0000000..871534c --- /dev/null +++ b/contrib/run-from-source.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# vim: textwidth=0 wrapmargin=0 tabstop=2 shiftwidth=2 softtabstop=2 smartindent smarttab + +BASEPATH="TOP LEVEL OF GIT CLONE" +LOGPATH="${BASEPATH}/logs" +PYTHON="python2.7" + +cd "${BASEPATH}" || exit 1 +mkdir -p ${LOGPATH} || exit 2 +cd eddn/src/eddn || exit 4 + +for d in Relay Monitor Gateway ; +do + echo "$d" + if ps "$(cat ${LOGPATH}/${d}.pid)" >/dev/null 2>&1; + then + echo "$d: Already running as $(cat ${LOGPATH}/${d}.pid)" + continue + fi + ${PYTHON} -m eddn.${d} \ + --config ${BASEPATH}/etc/settings.json \ + > ${LOGPATH}/$d.log \ + 2>&1 & + echo $! > "${LOGPATH}/${d}.pid" + #sleep 1 +done +