Difference between revisions of "Cert expiration check from dns zone file"
Jump to navigation
Jump to search
Line 24: | Line 24: | ||
domain=$1 | domain=$1 | ||
sleep_seconds=0 | sleep_seconds=0 | ||
+ | |||
for i in $(sed '/; Zone records/,$!d' ${domain}.zone | sed '1,4d' | awk '{print $1}'); do | for i in $(sed '/; Zone records/,$!d' ${domain}.zone | sed '1,4d' | awk '{print $1}'); do | ||
fqdns="${fqdns} ${i}.${domain}" | fqdns="${fqdns} ${i}.${domain}" |
Latest revision as of 22:58, 19 April 2023
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
#!/bin/bash # DNS zone files must be in $domain.zone file format set -e if [ "$#" -ne 1 ]; then echo "Usage: $0 <domain>" echo "Example: $0 mktp.io" exit fi domain=$1 sleep_seconds=0 for i in $(sed '/; Zone records/,$!d' ${domain}.zone | sed '1,4d' | awk '{print $1}'); do fqdns="${fqdns} ${i}.${domain}" sleep ${sleep_seconds} done cert $fqdns