2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-19 15:25:34 +00:00
Comrad/bin/komrade-op
quadrismegistus f86e961994 updates
2020-09-15 09:51:52 +01:00

34 lines
600 B
Plaintext
Executable File

##
# Run THE OPERATOR
##
export KOMRADE_SHOW_LOG=1
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
path=`realpath "$SCRIPTPATH/../komrade/backend/switchboard.py"`
pathvenv=`realpath "$SCRIPTPATH/../venv/bin/activate"`
source $pathvenv
date=$(date '+%Y-%m-%d')
pathlog="$SCRIPTPATH/../../data/log"
mkdir -p "$pathlog"
fnfn="$pathlog/$date.op.log"
#echo $pathlog
cmd="python $path 8080 $*"
# do forever
while true; do $cmd && break; done
#python $path 8080 $* >> $fnfn 2>&1
echo $path
echo $fnfn
#if command -v deactivate &> /dev/null
#then
# deactivate
#fi