From 6d8bce4e7d4699e90f69873c039e790a49630ca7 Mon Sep 17 00:00:00 2001
From: Christoph Knote <christoph.knote@lmu.de>
Date: Thu, 14 Dec 2017 07:03:30 +0000
Subject: [PATCH] Exported site specific loading information

---
 boxmox/_site_specific.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 boxmox/_site_specific.py

diff --git a/boxmox/_site_specific.py b/boxmox/_site_specific.py
new file mode 100644
index 0000000..18568bc
--- /dev/null
+++ b/boxmox/_site_specific.py
@@ -0,0 +1,12 @@
+import os
+import pwd
+
+user=pwd.getpwuid(os.getuid()) # full /etc/passwd info
+
+# possibly, www-data needs to know where BOXMOX is
+KPP_HOME="/var/www/inBOX/runbox/boxmox"
+
+if not 'KPP_HOME' in os.environ.keys() or user.pw_name == "www-data" or user.pw_name == "apache":
+  os.environ["KPP_HOME"] = KPP_HOME
+  os.environ["PATH"] += ":"+KPP_HOME+"/bin:"+KPP_HOME+"/boxmox/bin"
+                        
\ No newline at end of file
-- 
GitLab