update templates after soleil died

This commit is contained in:
root 2024-02-24 11:19:17 +00:00
parent 1f453008b2
commit 7c7dba090d
5 changed files with 17 additions and 37 deletions

View File

@ -1,9 +1,15 @@
REPLACEME: REPLACEME:
- geo: "*;*;*"
CNAME: pizza1.psf.lt.
- geo: "EU;*;*"
CNAME: pizza1.psf.lt.
- geo: "AF;*;*"
CNAME: pizza1.psf.lt.
- geo: "NA;*;*" - geo: "NA;*;*"
CNAME: us.projectsegfau.lt. CNAME: us.psf.lt.
- geo: "SA;*;*" - geo: "SA;*;*"
CNAME: us.projectsegfau.lt. CNAME: us.psf.lt.
- geo: "OC;*;*" - geo: "OC;*;*"
CNAME: us.projectsegfau.lt. CNAME: us.psf.lt.
- geo: "AS;*;*" - geo: "AS;*;*"
CNAME: in.projectsegfau.lt. CNAME: in.psf.lt.

View File

@ -1,23 +1,13 @@
#!/usr/bin/env bash #!/usr/bin/env bash
remote='cdn@us.vpn.projectsegfau.lt' #remote='cdn@us.vpn.projectsegfau.lt'
remote='cdn@100.64.0.19'
geoconf=/etc/knot/geo.conf geoconf=/etc/knot/geo.conf
domainsfile=/var/geodnsdomains domainsfile=/var/geodnsdomains
soltemplate=/configs/knot/soltemplate
pizzatemplate=/configs/knot/pizzatemplate
restemplate=/configs/knot/geodnstemplate restemplate=/configs/knot/geodnstemplate
printf '' > $geoconf printf '' > $geoconf
for i in $(<$domainsfile); do for i in $(<$domainsfile); do
cat $restemplate >> $geoconf cat $restemplate >> $geoconf
while IFS=, read -r dom ser; do sed -i "s/REPLACEME/${i}/" $geoconf
domain=$dom
server=$ser
done < <(echo ${i})
if [[ $server == "pizza1" ]]; then
cat $pizzatemplate >> $geoconf
elif [[ $server == "soleil" ]]; then
cat $soltemplate >> $geoconf
fi
sed -i "s/REPLACEME/${domain}/" $geoconf
done done
scp $geoconf "${remote}":/var/geo.conf scp $geoconf "${remote}":/var/geo.conf

View File

@ -1,7 +1,7 @@
server: server:
rundir: "/run/knot" rundir: "/run/knot"
user: knot:knot user: knot:knot
listen: 107.189.12.96@53 listen: [ 0.0.0.0@53, ::@53]
log: log:
- target: syslog - target: syslog
@ -15,16 +15,16 @@ include: /etc/knot/secrets.conf
remote: remote:
- id: secondary - id: secondary
address: 173.82.145.86@53 address: 74.48.191.220@53
key: us-node key: us-node
acl: acl:
- id: acl_secondary - id: acl_secondary
address: 173.82.145.86 address: 74.48.191.220
key: us-node key: us-node
action: transfer action: transfer
- id: acl_dynupdates - id: acl_dynupdates
address: [173.82.145.86, 92.148.60.159, 51.91.103.130, 110.227.202.171, 107.189.12.96] address: [74.48.191.220, 92.148.60.159, 51.91.103.130, 110.227.202.171, 89.33.85.209]
action: update action: update
key: dynupd key: dynupd

View File

@ -1,6 +0,0 @@
- geo: "*;*;*"
CNAME: pizza1.projectsegfau.lt.
- geo: "EU;*;*"
CNAME: pizza1.projectsegfau.lt.
- geo: "AF;*;*"
CNAME: pizza1.projectsegfau.lt.

View File

@ -1,10 +0,0 @@
- geo: "*;*;*"
A: 92.148.60.159
TXT: "Worldwide-Soleil-Lille"
- geo: "EU;*;*"
A: 92.148.60.159
TXT: "Europe-Soleil-Lille"
- geo: "AF;*;*"
A: 92.148.60.159
TXT: "Africa-Soleil-Lille"