X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=devel%2Fserver-loop.sh;h=78e1da15f154086ac7e1606d24cd9759d9b155da;hb=f60787dbdae954722ae23148060efaa9d27de6d7;hp=94215e886a992e33c041bdae37d1979b097c5fa5;hpb=bb8c2e8dcae8e0ac148a99d31e3a860117eb10e8;p=myslice.git diff --git a/devel/server-loop.sh b/devel/server-loop.sh index 94215e88..78e1da15 100755 --- a/devel/server-loop.sh +++ b/devel/server-loop.sh @@ -2,11 +2,14 @@ DIRNAME=$(dirname $0) cd $DIRNAME/.. -# default port : if hostname starts with z -> use 8080 ; otherwise take 80 -hostname | grep -q '^z' && port=8080 || port=80 +# default port : if hostname starts with z or with srv- -> use 8000 ; otherwise take 80 +hostname | egrep -q '^(z|srv-)' && port=8000 || port=80 [[ -n "$@" ]] && port=$1 while true; do - ./manage.py collectstatic --noinput + # we use make for convenience + # but what the static target really does is to invoke manage.py collectstatic + make static templates ./manage.py runserver 0.0.0.0:$port + sleep 1 done