2020-09-14 13:10:14 +00:00
|
|
|
##
|
|
|
|
# Run THE OPERATOR
|
|
|
|
##
|
2020-09-17 06:29:28 +00:00
|
|
|
|
|
|
|
# settings
|
2020-09-15 08:51:52 +00:00
|
|
|
export KOMRADE_SHOW_LOG=1
|
2020-09-14 16:17:50 +00:00
|
|
|
|
2020-09-17 06:29:28 +00:00
|
|
|
# get virtualenv going
|
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
|
|
|
|
2020-09-17 06:29:28 +00:00
|
|
|
# run op forever
|
2020-09-14 22:52:19 +00:00
|
|
|
cmd="python $path 8080 $*"
|
|
|
|
while true; do $cmd && break; done
|
2020-09-14 13:06:50 +00:00
|
|
|
|
2020-09-14 22:39:10 +00:00
|
|
|
#if command -v deactivate &> /dev/null
|
|
|
|
#then
|
|
|
|
# deactivate
|
|
|
|
#fi
|