mirror of
https://github.com/YunoHost/dynette.git
synced 2024-09-03 20:06:17 +02:00
make python script configurable
This commit is contained in:
parent
27c8691c32
commit
6cd1301fbc
1 changed files with 10 additions and 7 deletions
|
@ -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()))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue