Cert expiration check from dns zone file
Jump to navigation
Jump to search
Tool
https://github.com/genkiroid/cert
https://github.com/genkiroid/cert/releases
git clone https://github.com/genkiroid/cert cd cmd/cert go build -o cert if you want to build it from source using golang
Loop/parse zone file
#!/bin/bash # DNS zone files must be in $domain.zone file format set -eu if [ "$#" -ne 1 ]; then echo "Usage: $0 <domain>" echo "Example: $0 mktp.io" exit fi domain=$1 sleep_seconds=1 for i in $(sed '/; Zone records/,$!d' ${domain}.zone | sed '1,3d' | awk '{print $1}'); do # for i in $(cat ${domain}.zone | awk '{print $1}'); do cert ${i}.${domain} sleep ${sleep_seconds} done