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 '/'
@ -21,8 +18,14 @@ allowed_operations = {
}
### Script ###
lines = []
import os
import sys
import json
from urllib import urlopen
lines = ['// Generated by Dynette CRON']
for url in subs_urls:
domains = json.loads(str(urlopen(url +'/domains').read()))