aboutsummaryrefslogtreecommitdiff
path: root/rpkid/portal-gui/rpki.wsgi
diff options
context:
space:
mode:
Diffstat (limited to 'rpkid/portal-gui/rpki.wsgi')
-rw-r--r--rpkid/portal-gui/rpki.wsgi9
1 files changed, 8 insertions, 1 deletions
diff --git a/rpkid/portal-gui/rpki.wsgi b/rpkid/portal-gui/rpki.wsgi
index a01bf8f7..72ba75ac 100644
--- a/rpkid/portal-gui/rpki.wsgi
+++ b/rpkid/portal-gui/rpki.wsgi
@@ -22,7 +22,8 @@ import os
import rpki.autoconf
os.environ['DJANGO_SETTINGS_MODULE'] = 'rpki.gui.default_settings'
-# needed for local_settings.py
+
+# Needed for local_settings.py
sys.path.insert(1, rpki.autoconf.sysconfdir + '/rpki')
# Kludge to disable use of setproctitle in rpki.log. For reasons
@@ -32,6 +33,12 @@ sys.path.insert(1, rpki.autoconf.sysconfdir + '/rpki')
# what this is about, just disable setproctitle in WSGI case for now.
os.environ['DISABLE_SETPROCTITLE'] = 'yes'
+# Kludge to set PYTHON_EGG_CACHE, mostly for FreeBSD where the ports
+# system installs Python eggs in their zipped format and expects each
+# user application to unpack them into its own egg cache.
+if not os.environ.get('PYTHON_EGG_CACHE') and rpki.autoconf.WSGI_PYTHON_EGG_CACHE_DIR:
+ os.environ['PYTHON_EGG_CACHE'] = rpki.autoconf.WSGI_PYTHON_EGG_CACHE_DIR
+
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()