aboutsummaryrefslogtreecommitdiffstats
path: root/run.py
diff options
context:
space:
mode:
Diffstat (limited to 'run.py')
-rwxr-xr-xrun.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/run.py b/run.py
index dccdad1..ed0f53a 100755
--- a/run.py
+++ b/run.py
@@ -1,5 +1,14 @@
#!/usr/bin/env python
import ddns
+import os
+import ddns.cfg_parser
-if __name__ == '__main__':
- ddns.app.run(host="0.0.0.0", debug=True)
+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()
+
+ddns.app.run(debug=True)