Compare commits

...

2 Commits

Author SHA1 Message Date
Daniel Gröber 8823b6238f server: Fix gpgv script 1 month ago
Daniel Gröber cbebe3d1d6 Update ns0 address, it's now portforwarded on the main IP 1 month ago
  1. 4
      it-syndikat.org.zone
  2. 12
      server/knot-gpgv-import

4
it-syndikat.org.zone

@ -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

12
server/knot-gpgv-import

@ -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*}")"

Loading…
Cancel
Save