Update wipi.cfgi to load the correct config.
authorMatthijs Kooijman <matthijs@stdio.flexvps.nl>
Thu, 20 Nov 2008 19:48:02 +0000 (20:48 +0100)
committerMatthijs Kooijman <matthijs@stdio.flexvps.nl>
Thu, 20 Nov 2008 19:48:02 +0000 (20:48 +0100)
Make it load the config file relative to its own location. Also, strip out some
unneeded stuff from the file.

wipi.fcgi

index 91462912e27cf7abdc09bf65cf43e0ea27171d2f..9795dcbbc760da0087ac34316a77b754bfec5a3c 100755 (executable)
--- a/wipi.fcgi
+++ b/wipi.fcgi
@@ -9,38 +9,21 @@
 
 import sys, os
 
-# a) Configuration of Python's code search path
-#    If you already have set up the PYTHONPATH environment variable for the
-#    stuff you see below, you don't need to do a1) and a2).
+# Define the path to our config relative to where we are.
+confdir = os.path.join(os.path.dirname(__file__), 'conf')
 
-# a1) Path of the directory where the MoinMoin code package is located.
-#     Needed if you installed with --prefix=PREFIX or you didn't use setup.py.
-#sys.path.insert(0, 'PREFIX/lib/python2.3/site-packages')
+# Put our config in the python path
+sys.path.insert(0, confdir)
 
-# a2) Path of the directory where wikiconfig.py / farmconfig.py is located.
-#     See wiki/config/... for some sample config files.
-#sys.path.insert(0, '/etc/moin')
-sys.path.insert(0, '/etc/moin')
-
-# b) Configuration of moin's logging
-#    If you have set up MOINLOGGINGCONF environment variable, you don't need this!
-#    You also don't need this if you are happy with the builtin defaults.
-#    See wiki/config/logging/... for some sample config files.
-#from MoinMoin import log
-#log.load_config('/path/to/logging_configuration_file')
+# Load a logging conf
+from MoinMoin import log
+log.load_config(os.path.join(confdir, 'logging.conf'))
 
 # Debug mode - show detailed error reports
 #os.environ['MOIN_DEBUG'] = '1'
 
-
 from MoinMoin.server.server_fastcgi import FastCgiConfig, run
-
 class Config(FastCgiConfig):
-    properties = {}
-    # properties = {'script_name': '/'} # use this instead of the line above if your wiki runs under "/" url
-
-    # for backlog, we use a default of 5. if the listen(backlog) call crashes for you, try a smaller value!
-    # backlog = 1
+    pass
 
 run(Config)
-