From e48209fca8e2728ad48338454a7da4f0ea896484 Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Wed, 6 Sep 2023 14:14:03 +0500 Subject: [PATCH] Move domain to hardcoded var, fix DNS ttl --- bash_scripts/ddns-acme-porkbun.sh | 2 +- python_scripts/ddns-porkbun.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bash_scripts/ddns-acme-porkbun.sh b/bash_scripts/ddns-acme-porkbun.sh index 40a0ef4..8735a0d 100644 --- a/bash_scripts/ddns-acme-porkbun.sh +++ b/bash_scripts/ddns-acme-porkbun.sh @@ -4,7 +4,7 @@ if [ ! -f "/etc/ddns-acme-porkbun.env" ]; then echo "Porkbun API key .env missing" exit 1 fi - +DOMAINS=("272254864.xyz" "*.272254864.xyz") 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 diff --git a/python_scripts/ddns-porkbun.py b/python_scripts/ddns-porkbun.py index 3046306..20bc74d 100644 --- a/python_scripts/ddns-porkbun.py +++ b/python_scripts/ddns-porkbun.py @@ -11,8 +11,8 @@ class PorkbunClient(): self.api_key = os.environ["PORKBUN_API_KEY"] self.client = requests.Session() self.porkbun_url_base = "https://porkbun.com/api/json/v3" - self.domain = os.environ["DOMAINS"][0] - self.ttl = os.environ.get("DNS_TTL", "5184000") + self.domain = "272254864.xyz" + self.ttl = "5184000" self.get_ips() self.update_records()