From 6cd1301fbc8708c44225a720d35417d3e74ef285 Mon Sep 17 00:00:00 2001 From: Kload Date: Mon, 17 Jun 2013 08:40:53 +0000 Subject: [PATCH] make python script configurable --- dynette.cron.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dynette.cron.py b/dynette.cron.py index 33b984a..8daa26b 100755 --- a/dynette.cron.py +++ b/dynette.cron.py @@ -1,9 +1,6 @@ #!/usr/bin/python -import os -import sys -import json -from urllib import urlopen +### Configuration ### conf_file = '/etc/bind/named.conf.local' # Include this filename in '/etc/bind/named.conf' zone_dir = '/var/named/data/' # Do not forget the trailing '/' @@ -19,10 +16,16 @@ allowed_operations = { '_xmpp-client._tcp.' : ['SRV'], '_xmpp-server._tcp.' : ['SRV'] } + + +### Script ### + +import os +import sys +import json +from urllib import urlopen - - -lines = [] +lines = ['// Generated by Dynette CRON'] for url in subs_urls: domains = json.loads(str(urlopen(url +'/domains').read()))