Add run_without_output to start_db.sh

This commit is contained in:
Fabio Giovanazzi 2025-08-02 00:38:51 +02:00
parent 63f2ccac3e
commit e24a99eb9d
No known key found for this signature in database
GPG key ID: 4BDF1B40A49FDD23

View file

@ -29,10 +29,16 @@ elif [[ $# == 1 ]] && [[ $1 == "run" ]]; then
python manage.py processupdates python manage.py processupdates
python manage.py runserver python manage.py runserver
popd 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 elif [[ $# > 0 ]] && [[ $1 == "manage" ]]; then
pushd src pushd src
python manage.py "${@:2}" python manage.py "${@:2}"
popd popd
else else
echo "Usage: $0 [stop|db|run|manage]" echo "Usage: $0 [stop|db|run|run_without_output|manage]"
fi fi