diff --git a/simple_gunicorn.sh b/simple_gunicorn.sh index 82530bc50..673ff526f 100755 --- a/simple_gunicorn.sh +++ b/simple_gunicorn.sh @@ -7,4 +7,7 @@ source ~/.virtualenvs/sapl/bin/activate export DJANGO_SETTINGS_MODULE=$DJANGO_SETTINGS_MODULE export PYTHONPATH=$DJANGODIR:$PYTHONPATH -gunicorn --bind 10.1.2.119:8000 sapl.wsgi:application +# Get eth0 IP and filter out the netmask portion (/24, e.g.) +IP=`ip addr | grep 'inet .* eth0' | awk '{print $2}' | sed 's/\/[0-9]*//'` + +gunicorn --bind $IP:8000 sapl.wsgi:application