Fixes certbot acme validation reset

This commit is contained in:
Akshay Nair
2021-04-10 14:07:43 +05:30
parent 9e1a73ea08
commit 7ce8af690f
+4 -2
View File
@@ -74,15 +74,16 @@ upload_acme_file() {
}
reset_acme() {
update_record remove A 'www.is-a.dev' "68.65.123.44";
update_record remove A 'www' "68.65.123.44";
sleep 1;
update_record add CNAME 'www.is-a.dev' "is-a-dev.github.io";
update_record add CNAME 'www' "is-a-dev.github.io";
}
case "$1" in
check)
echo "TXT record:: $(dig +noall +answer _acme-challenge.is-a.dev TXT | awk '{print $5}')";
;;
config_www) update_www_record ;;
acme_txt) update_acme_txt_record "$2" ;;
acme_file) upload_acme_file "$2" "$3" ;;
cert) generate_certificate ;;
@@ -95,6 +96,7 @@ esac
# Run ./scripts/certbot.sh cert
# Run ./scripts/certbot.sh acme_txt "<key>"
# Run ./scripts/certbot.sh acme_file "<key>" "<value>"
# Run ./scripts/certbot.sh config_www
# Upload cert.pem and privkey.pem contents to SSL > Manage SSL Sites
# Run ./scripts/certbot.sh reset