make python script configurable

This commit is contained in:
Kload 2013-06-17 08:40:53 +00:00
parent 27c8691c32
commit 6cd1301fbc

View file

@ -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()))