make-domains.sh

This commit is contained in:
ale 2024-10-14 21:09:38 +02:00
parent 5a6264a8e9
commit 6bd9449729
5 changed files with 16 additions and 1 deletions

View File

@ -5,7 +5,8 @@
## Config ## 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 ## Build

View File

@ -1,2 +1,3 @@
manalejandro.com dns_server; manalejandro.com dns_server;
another.manalejandro.com dns_server; another.manalejandro.com dns_server;
another2.manalejandro.com dns_server;

View File

@ -1,2 +1,3 @@
manalejandro.com dns_server_v6; manalejandro.com dns_server_v6;
another.manalejandro.com dns_server_v6; another.manalejandro.com dns_server_v6;
another2.manalejandro.com dns_server_v6;

10
make-domains.sh Executable file
View File

@ -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

2
subdomains.txt Normal file
View File

@ -0,0 +1,2 @@
another
another2