diff --git a/deployment/docker-compose.yml b/deployment/docker-compose.yml index 541c686..7753d24 100644 --- a/deployment/docker-compose.yml +++ b/deployment/docker-compose.yml @@ -5,7 +5,7 @@ services: restart: always environment: DDNS_ADMIN_LOGIN: 'admin:$$3$$abcdefg' - DDNS_DOMAIN: 'dyndns.example.com' + DDNS_DOMAINS: 'dyndns.example.com' DDNS_PARENT_NS: 'ns.example.com' DDNS_DEFAULT_TTL: '3600' ports: diff --git a/deployment/envfile b/deployment/envfile index 02a3d4c..8cbdb69 100644 --- a/deployment/envfile +++ b/deployment/envfile @@ -1,4 +1,4 @@ DDNS_ADMIN_LOGIN=admin:$$3$$abcdefg -DDNS_DOMAIN=dyndns.example.com +DDNS_DOMAINS=dyndns.example.com DDNS_PARENT_NS=ns.example.com DDNS_DEFAULT_TTL=3600 \ No newline at end of file diff --git a/deployment/setup.sh b/deployment/setup.sh index e2bf615..b45ba18 100644 --- a/deployment/setup.sh +++ b/deployment/setup.sh @@ -1,33 +1,35 @@ #!/bin/bash [ -z "$DDNS_ADMIN_LOGIN" ] && echo "DDNS_ADMIN_LOGIN not set" && exit 1; -[ -z "$DDNS_DOMAIN" ] && echo "DDNS_DOMAIN not set" && exit 1; +[ -z "$DDNS_DOMAINS" ] && echo "DDNS_DOMAINS not set" && exit 1; [ -z "$DDNS_PARENT_NS" ] && echo "DDNS_PARENT_NS not set" && exit 1; [ -z "$DDNS_DEFAULT_TTL" ] && echo "DDNS_DEFAULT_TTL not set" && exit 1; DDNS_IP=$(curl icanhazip.com) -if ! grep 'zone "'$DDNS_DOMAIN'"' /etc/bind/named.conf > /dev/null -then - echo "creating zone..."; - cat >> /etc/bind/named.conf < /dev/null + then + echo "creating zone..."; + cat >> /etc/bind/named.conf < /var/cache/bind/$DDNS_DOMAIN.zone < /var/cache/bind/$d.zone <