rut-prod-ops/scripts/change_back_ttl_on_host.sh

12 lines
268 B
Bash
Raw Normal View History

2025-04-22 12:43:04 +02:00
#!/bin/bash
SERVERNAME=$1
DOMAIN=rut.sunet.se
ipv4=$(dig -t a +short $SERVERNAME)
ipv6=$(dig -t aaaa +short $SERVERNAME)
knotctl update -z $DOMAIN -n ${SERVERNAME}. -a ttl=3600 -r AAAA -d $ipv6
knotctl update -z $DOMAIN -n ${SERVERNAME}. -a ttl=3600 -r A -d $ipv4