2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-17 21:25:37 +00:00
Comrad/bin/komrade-op
quadrismegistus 2a6382e3b6 updates
2020-09-14 23:41:46 +01:00

27 lines
488 B
Plaintext
Executable File

##
# Run THE OPERATOR
##
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/../log/$date.op.log"
#echo $pathlog
cmd="python $path 8080 $* >> $pathlog 2>&1"
# do forever
while true; do $cmd && break; done
#if command -v deactivate &> /dev/null
#then
# deactivate
#fi