start-worker.sh 399 B

123456789101112131415161718
  1. #!/bin/bash
  2. # Copyright: (c) OpenSpug Organization. https://github.com/openspug/spug
  3. # Copyright: (c) <spug.dev@gmail.com>
  4. # Released under the AGPL-3.0 License.
  5. # start worker service
  6. cd $(dirname $(dirname $0))
  7. if [ -f ./venv/bin/activate ]; then
  8. source ./venv/bin/activate
  9. fi
  10. if command -v python3 &> /dev/null; then
  11. PYTHON=python3
  12. else
  13. PYTHON=python
  14. fi
  15. exec $PYTHON manage.py runworker