EDDN/contrib/run-from-source.sh
Athanasius 8d34c3335f 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.
2021-05-16 10:41:17 +01:00

28 lines
600 B
Bash

#!/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