2023-04-16 16:05:37 +05:30
|
|
|
#!/usr/bin/env bash
|
|
|
|
geoconf=/etc/knot/geo.conf
|
2023-05-30 15:07:27 +05:30
|
|
|
remote='cdn@us.projectsegfau.lt'
|
2023-04-16 16:05:37 +05:30
|
|
|
printf '' > $geoconf
|
|
|
|
for i in $(</var/geodnsdomains); do
|
|
|
|
cat /etc/knot/geodnstemplate >> $geoconf
|
|
|
|
sed -i "s/REPLACEME/${i}/" $geoconf
|
|
|
|
done
|
|
|
|
scp $geoconf "${remote}":/var/geo.conf
|
|
|
|
ssh $remote "sudo systemctl restart knot"
|
|
|
|
systemctl restart knot
|