Skip to content

Commit

Permalink
Make config path an argument
Browse files Browse the repository at this point in the history
  • Loading branch information
duk3luk3 committed Aug 3, 2017
1 parent c1ae10f commit 28e0a50
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pdns-dynamic-reverse-backend.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python
#!/usr/bin/env python
#
"""
PowerDNS pipe backend for generating reverse DNS entries and their
Expand Down Expand Up @@ -248,5 +248,10 @@ def parse_config(config_path):
if __name__ == '__main__':
import sys

prefixes, rtree = parse_config(CONFIG)
if len(sys.argv) > 1:
config_path = sys.argv[1]
else:
config_path = CONFIG

prefixes, rtree = parse_config(config_path)
sys.exit(parse(prefixes, rtree, sys.stdin, sys.stdout))

0 comments on commit 28e0a50

Please sign in to comment.