diff --git a/spug_api/tools/start-monitor.sh b/spug_api/tools/start-monitor.sh index 7f71b5a..6bf2e39 100644 --- a/spug_api/tools/start-monitor.sh +++ b/spug_api/tools/start-monitor.sh @@ -8,4 +8,11 @@ cd $(dirname $(dirname $0)) if [ -f ./venv/bin/activate ]; then source ./venv/bin/activate fi -exec python manage.py runmonitor + +if command -v python3 &> /dev/null; then + PYTHON=python3 +else + PYTHON=python +fi + +exec $PYTHON manage.py runmonitor diff --git a/spug_api/tools/start-scheduler.sh b/spug_api/tools/start-scheduler.sh index 8115c6d..87037fd 100644 --- a/spug_api/tools/start-scheduler.sh +++ b/spug_api/tools/start-scheduler.sh @@ -8,4 +8,11 @@ cd $(dirname $(dirname $0)) if [ -f ./venv/bin/activate ]; then source ./venv/bin/activate fi -exec python manage.py runscheduler + +if command -v python3 &> /dev/null; then + PYTHON=python3 +else + PYTHON=python +fi + +exec $PYTHON manage.py runscheduler diff --git a/spug_api/tools/start-worker.sh b/spug_api/tools/start-worker.sh index a19e826..183372e 100644 --- a/spug_api/tools/start-worker.sh +++ b/spug_api/tools/start-worker.sh @@ -8,4 +8,11 @@ cd $(dirname $(dirname $0)) if [ -f ./venv/bin/activate ]; then source ./venv/bin/activate fi -exec python manage.py runworker ssh_exec + +if command -v python3 &> /dev/null; then + PYTHON=python3 +else + PYTHON=python +fi + +exec $PYTHON manage.py runworker ssh_exec