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 #!/usr/bin/python
import os ### Configuration ###
import sys
import json
from urllib import urlopen
conf_file = '/etc/bind/named.conf.local' # Include this filename in '/etc/bind/named.conf' 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 '/' zone_dir = '/var/named/data/' # Do not forget the trailing '/'
@ -19,10 +16,16 @@ allowed_operations = {
'_xmpp-client._tcp.' : ['SRV'], '_xmpp-client._tcp.' : ['SRV'],
'_xmpp-server._tcp.' : ['SRV'] '_xmpp-server._tcp.' : ['SRV']
} }
### Script ###
import os
import sys
import json
from urllib import urlopen
lines = ['// Generated by Dynette CRON']
lines = []
for url in subs_urls: for url in subs_urls:
domains = json.loads(str(urlopen(url +'/domains').read())) domains = json.loads(str(urlopen(url +'/domains').read()))