Move domain to hardcoded var, fix DNS ttl

This commit is contained in:
Muaz Ahmad 2023-09-06 14:14:03 +05:00
parent 198ae322c4
commit e48209fca8
2 changed files with 3 additions and 3 deletions

View file

@ -4,7 +4,7 @@ if [ ! -f "/etc/ddns-acme-porkbun.env" ]; then
echo "Porkbun API key .env missing" echo "Porkbun API key .env missing"
exit 1 exit 1
fi fi
DOMAINS=("272254864.xyz" "*.272254864.xyz")
set -a; source /etc/ddns-acme-porkbun.env; set +a set -a; source /etc/ddns-acme-porkbun.env; set +a
if [ -z "$EMAIL" ] || [ -z "$DOMAINS" ] || [ -z "$PORKBUN_SECRET_API_KEY" ] || [ -z "$PORKBUN_API_KEY" ]; then if [ -z "$EMAIL" ] || [ -z "$DOMAINS" ] || [ -z "$PORKBUN_SECRET_API_KEY" ] || [ -z "$PORKBUN_API_KEY" ]; then

View file

@ -11,8 +11,8 @@ class PorkbunClient():
self.api_key = os.environ["PORKBUN_API_KEY"] self.api_key = os.environ["PORKBUN_API_KEY"]
self.client = requests.Session() self.client = requests.Session()
self.porkbun_url_base = "https://porkbun.com/api/json/v3" self.porkbun_url_base = "https://porkbun.com/api/json/v3"
self.domain = os.environ["DOMAINS"][0] self.domain = "272254864.xyz"
self.ttl = os.environ.get("DNS_TTL", "5184000") self.ttl = "5184000"
self.get_ips() self.get_ips()
self.update_records() self.update_records()