2023-04-16 16:05:37 +05:30
|
|
|
#!/usr/bin/env bash
|
|
|
|
geoconf=/etc/knot/geo.conf
|
2023-06-25 13:51:42 +05:30
|
|
|
remote='cdn@us'
|
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
|