Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Gröber 8823b6238f server: Fix gpgv script
We do in fact control the upload order, it's in the makefile. So just
upload the zone first then the sig and then only verify and copy on the sig
upload.
2021-10-28 04:09:19 +02:00
Daniel Gröber cbebe3d1d6 Update ns0 address, it's now portforwarded on the main IP 2021-10-28 03:35:00 +02:00
2 changed files with 8 additions and 8 deletions

View File

@ -2,7 +2,7 @@
@ SOA ( ns0.it-syndikat.org.
hostmaster.it-syndikat.org.
1618552606 ; serial
1635384850 ; serial
3h ; refresh
1h ; retry
4w ; expire
@ -18,7 +18,7 @@ $TTL 5m
NS robotns2.second-ns.de.
NS robotns3.second-ns.com.
NS ns6.gandi.net.
ns0 A 85.10.196.15
ns0 A 85.10.196.35
ns0 AAAA 2a01:4f8:a0:6171:0:ff:fe00:1f
@ A 85.10.196.35

View File

@ -5,16 +5,16 @@ set -eu
file="$1"
case "$file" in
# We don't control the order of the zone/sig upload so just try on both
*.zone) ;;
*.zone.sig) ;;
# Ignore everything else
*) exit 0 ;;
esac
zone=${file%*.sig}
[ -f "$file" ] || exit 1
[ -f "$file".sig ] || exit 2
gpgv --keyring $HOME/trustedkeys.kbx "$file".sig "$file" || exit 3
cp -t /var/lib/knot "$file" || exit 4
sudo -u knot knotc zone-reload "$(basename "${file%*.zone*}")"
[ -f "$zone" ] || exit 2
gpgv --keyring $HOME/trustedkeys.kbx "$file" "$zone" || exit 3
cp -t /var/lib/knot "$zone" || exit 4
sudo -u knot knotc zone-reload "$(basename "${zone%*.zone*}")"