From 6bd9449729031c125080503165dbe27a646f8edb Mon Sep 17 00:00:00 2001 From: ale Date: Mon, 14 Oct 2024 21:09:38 +0200 Subject: [PATCH] make-domains.sh --- README.md | 3 ++- domains.txt | 1 + domains_v6.txt | 1 + make-domains.sh | 10 ++++++++++ subdomains.txt | 2 ++ 5 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 make-domains.sh create mode 100644 subdomains.txt diff --git a/README.md b/README.md index b22422a..d6d14b8 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,8 @@ ## Config ``` -edit .env and domains files with your settings +edit .env and domains files with your settings and use tool for generate domains.txt files: +$ ./make-domains.sh "domain.com" ``` ## Build diff --git a/domains.txt b/domains.txt index c2a646a..606b3f7 100644 --- a/domains.txt +++ b/domains.txt @@ -1,2 +1,3 @@ manalejandro.com dns_server; another.manalejandro.com dns_server; +another2.manalejandro.com dns_server; diff --git a/domains_v6.txt b/domains_v6.txt index fe3d8b3..62f7f27 100644 --- a/domains_v6.txt +++ b/domains_v6.txt @@ -1,2 +1,3 @@ manalejandro.com dns_server_v6; another.manalejandro.com dns_server_v6; +another2.manalejandro.com dns_server_v6; diff --git a/make-domains.sh b/make-domains.sh new file mode 100755 index 0000000..b067d2b --- /dev/null +++ b/make-domains.sh @@ -0,0 +1,10 @@ +#!/bin/bash +echo "$1 dns_server;" > domains.txt +for d in $(cat subdomains.txt); do +echo "$d.$1 dns_server;" >> domains.txt +done +echo "$1 dns_server_v6;" > domains_v6.txt +for d in $(cat subdomains.txt); do +echo "$d.$1 dns_server_v6;" >> domains_v6.txt +done +exit 0 diff --git a/subdomains.txt b/subdomains.txt new file mode 100644 index 0000000..a449844 --- /dev/null +++ b/subdomains.txt @@ -0,0 +1,2 @@ +another +another2