2020-09-14 13:10:14 +00:00
|
|
|
##
|
|
|
|
# Run THE OPERATOR
|
|
|
|
##
|
2020-09-14 13:06:50 +00:00
|
|
|
|
2020-09-14 16:17:50 +00:00
|
|
|
|
|
|
|
SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
|
2020-09-14 13:06:50 +00:00
|
|
|
path=`realpath "$SCRIPTPATH/../komrade/backend/switchboard.py"`
|
|
|
|
pathvenv=`realpath "$SCRIPTPATH/../venv/bin/activate"`
|
|
|
|
|
|
|
|
source $pathvenv
|
2020-09-14 22:39:10 +00:00
|
|
|
date=$(date '+%Y-%m-%d')
|
2020-09-14 22:44:33 +00:00
|
|
|
pathlog="$SCRIPTPATH/../../data/log"
|
|
|
|
mkdir -p "$pathlog"
|
|
|
|
fnfn="$pathlog/$date.op.log"
|
2020-09-14 13:06:50 +00:00
|
|
|
|
2020-09-14 22:41:46 +00:00
|
|
|
#echo $pathlog
|
2020-09-14 22:39:10 +00:00
|
|
|
|
2020-09-14 22:47:12 +00:00
|
|
|
#cmd="python $path 8080 $* >> $fnfn 2>&1"
|
2020-09-14 13:06:50 +00:00
|
|
|
|
2020-09-14 13:10:14 +00:00
|
|
|
# do forever
|
2020-09-14 22:47:12 +00:00
|
|
|
#while true; do $cmd && break; done
|
2020-09-14 13:06:50 +00:00
|
|
|
|
2020-09-14 22:47:12 +00:00
|
|
|
python $path 8080 $* >> $fnfn 2>&1
|
2020-09-14 16:47:39 +00:00
|
|
|
|
2020-09-14 22:39:10 +00:00
|
|
|
#if command -v deactivate &> /dev/null
|
|
|
|
#then
|
|
|
|
# deactivate
|
|
|
|
#fi
|