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:
- geo: "*;*;*"
CNAME: pizza1.psf.lt.
- geo: "EU;*;*"
CNAME: pizza1.psf.lt.
- geo: "AF;*;*"
CNAME: pizza1.psf.lt.
- geo: "NA;*;*"
CNAME: us.projectsegfau.lt.
CNAME: us.psf.lt.
- geo: "SA;*;*"
CNAME: us.projectsegfau.lt.
CNAME: us.psf.lt.
- geo: "OC;*;*"
CNAME: us.projectsegfau.lt.
CNAME: us.psf.lt.
- geo: "AS;*;*"
CNAME: in.projectsegfau.lt.
CNAME: in.psf.lt.

View File

@ -1,23 +1,13 @@
#!/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
domainsfile=/var/geodnsdomains
soltemplate=/configs/knot/soltemplate
pizzatemplate=/configs/knot/pizzatemplate
restemplate=/configs/knot/geodnstemplate
printf '' > $geoconf
for i in $(<$domainsfile); do
cat $restemplate >> $geoconf
while IFS=, read -r dom ser; do
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
sed -i "s/REPLACEME/${i}/" $geoconf
done
scp $geoconf "${remote}":/var/geo.conf

View File

@ -1,7 +1,7 @@
server:
rundir: "/run/knot"
user: knot:knot
listen: 107.189.12.96@53
listen: [ 0.0.0.0@53, ::@53]
log:
- target: syslog
@ -15,16 +15,16 @@ include: /etc/knot/secrets.conf
remote:
- id: secondary
address: 173.82.145.86@53
address: 74.48.191.220@53
key: us-node
acl:
- id: acl_secondary
address: 173.82.145.86
address: 74.48.191.220
key: us-node
action: transfer
- 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
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"