From d398793a759acc1d8bf2484f3533d0e9744bd429 Mon Sep 17 00:00:00 2001 From: Marius Halden Date: Mon, 17 Mar 2014 19:10:00 +0100 Subject: Chaged where the configfile is defined and how the config is used --- ddns.wsgi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'ddns.wsgi') diff --git a/ddns.wsgi b/ddns.wsgi index 9e5292c..4e11d0c 100644 --- a/ddns.wsgi +++ b/ddns.wsgi @@ -1,4 +1,15 @@ #import sys #sys.path.insert(0, '/path/to/ddns/dir/') -#from main import app as application + +import os +import ddns.cfg_parser + +if os.environ.get('DDNS_CFG_PATH'): + cfg_file = os.environ['DDNS_CFG_PATH'] +else: + cfg_file = os.path.dirname(os.path.realpath(__file__)) + '/ddns.cfg' + +ddns.cfg_parser.cfg_file = cfg_file +ddns.cfg_parser.read_config() + from ddns import app as application -- cgit v1.2.3