diff --git a/start_db.sh b/start_db.sh index 3397af90..5a480395 100755 --- a/start_db.sh +++ b/start_db.sh @@ -29,10 +29,16 @@ elif [[ $# == 1 ]] && [[ $1 == "run" ]]; then python manage.py processupdates python manage.py runserver popd +elif [[ $# == 1 ]] && [[ $1 == "run_without_output" ]]; then + echo "Processing updates and running server without output" + pushd src 2>&1 > /dev/null + python manage.py processupdates 2>&1 | (grep -e "^ERROR" -e "^WARNING" -e "^HTTP" || true) + python manage.py runserver 2>&1 | (grep -e "^ERROR" -e "^WARNING" -e "^HTTP" || true) + popd 2>&1 > /dev/null elif [[ $# > 0 ]] && [[ $1 == "manage" ]]; then pushd src python manage.py "${@:2}" popd else - echo "Usage: $0 [stop|db|run|manage]" + echo "Usage: $0 [stop|db|run|run_without_output|manage]" fi