diff --git a/configure.sh b/configure.sh index e769bfb0919593fca417707abeffaa27dd7769bc..804efb9f40a8b27d2224d7c7980ce4fffe9b0f6b 100755 --- a/configure.sh +++ b/configure.sh @@ -3,6 +3,7 @@ echo "Running configure.sh" DEBUG=${DEBUG:="false"} + ENABLE_HTTP_ACCESS=${ENABLE_HTTP_ACCESS:="false"} # Configure instance sed -e "s/'disable_existing_loggers': True,/'disable_existing_loggers': False,/" -i pvs_instance/settings.py HANDLERS="'handlers': {\n @@ -62,6 +63,13 @@ sed -e "s/SECRET_KEY = '.*'/SECRET_KEY = '${DJANGO_SECRET_KEY}'/" -i pvs_instance/settings.py chmod g+w -R . chgrp users -R . + + if [[ "$ENABLE_HTTP_ACCESS" = true ]] ; then + echo "Installing and enabling http_access" + pip install http-access==0.0.1 + echo "INSTALLED_APPS += ('http_access', )" >> pvs_instance/settings.py + echo "urlpatterns.append(re_path(r'^http/', include('http_access.urls')))" >> pvs_instance/urls.py + fi if [[ "$DEBUG" = true ]] ; then echo "DEBUG ON Setting functions"