You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

17 lines
525 B

#!/usr/bin/env bash
# You must either have a suitable ~/.my.cnf containing a user / pass
# for your mysql / mariadb database, OR you must uncomment the next line
# (which is a security risk; don't do it!) and adjust accordingly.
#CREDENTIALS="-uUSERNAME -pPASSWORD"
FQDN=$1
# If your database name is not powerdns, change it here.
DB="powerdns"
mysql -ss "${CREDENTIALS}" -e "DELETE FROM ${DB}.records WHERE \
name = '_acme-challenge.${FQDN}';"
echo "DELETE FROM ${DB}.records WHERE name = '_acme-challenge.${FQDN}';"