upgpkg: ocaml-topkg 1.0.5-2
[arch-packages.git] / dnssec-anchors / trunk / dnssec-anchors-versioned.sh
blob9222332c15baefc97d411d9006820f560d3ddc47
1 #!/usr/bin/bash
3 TRUSTED_KEY=trusted-key-$(date +%Y%m%d).key
4 DEST=/srv/ftp/other/packages/dnssec-anchors
6 update_key() {
7 key=$1
8 unbound-anchor -v -a root.key ||
9 unbound-anchor -v -a root.key
11 unbound-host -v -f root.key -t DNSKEY . |
12 sed 's/ (secure)//;t;d' |
13 sed 's/ has / IN /' |
14 sed 's/ record / /' \
15 > "${key}"
17 # Cleanup created root.key
18 rm root.key
21 update_key "${TRUSTED_KEY}"
23 scp "${TRUSTED_KEY}" repos.archlinux.org:${DEST}