diff --git a/spug_api/tools/start-api.sh b/spug_api/tools/start-api.sh index adb5b96..8f8df53 100644 --- a/spug_api/tools/start-api.sh +++ b/spug_api/tools/start-api.sh @@ -5,5 +5,7 @@ # start api service cd $(dirname $(dirname $0)) -source ./venv/bin/activate +if [ -f ./venv/bin/activate ]; then + source ./venv/bin/activate +fi exec gunicorn -b 127.0.0.1:9001 -w 2 --threads 8 --access-logfile - spug.wsgi diff --git a/spug_api/tools/start-monitor.sh b/spug_api/tools/start-monitor.sh index 5194947..ef52f1c 100644 --- a/spug_api/tools/start-monitor.sh +++ b/spug_api/tools/start-monitor.sh @@ -5,5 +5,7 @@ # start monitor service cd $(dirname $(dirname $0)) -source ./venv/bin/activate +if [ -f ./venv/bin/activate ]; then + source ./venv/bin/activate +fi exec python manage.py runmonitor diff --git a/spug_api/tools/start-scheduler.sh b/spug_api/tools/start-scheduler.sh index 37094a5..7e220e1 100644 --- a/spug_api/tools/start-scheduler.sh +++ b/spug_api/tools/start-scheduler.sh @@ -5,5 +5,7 @@ # start schedule service cd $(dirname $(dirname $0)) -source ./venv/bin/activate +if [ -f ./venv/bin/activate ]; then + source ./venv/bin/activate +fi exec python manage.py runscheduler diff --git a/spug_api/tools/start-worker.sh b/spug_api/tools/start-worker.sh index a799f7d..f8c43fd 100644 --- a/spug_api/tools/start-worker.sh +++ b/spug_api/tools/start-worker.sh @@ -5,5 +5,7 @@ # start worker service cd $(dirname $(dirname $0)) -source ./venv/bin/activate +if [ -f ./venv/bin/activate ]; then + source ./venv/bin/activate +fi exec python manage.py runworker ssh_exec diff --git a/spug_api/tools/start-ws.sh b/spug_api/tools/start-ws.sh index c8889a8..f30c3ba 100644 --- a/spug_api/tools/start-ws.sh +++ b/spug_api/tools/start-ws.sh @@ -5,5 +5,7 @@ # start websocket service cd $(dirname $(dirname $0)) -source ./venv/bin/activate +if [ -f ./venv/bin/activate ]; then + source ./venv/bin/activate +fi exec daphne -p 9002 spug.asgi:application