make-domains.sh

Este commit está contenido en:
ale
2024-10-14 21:09:38 +02:00
padre 5a6264a8e9
commit 6bd9449729
Se han modificado 5 ficheros con 16 adiciones y 1 borrados

Ver fichero

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

Ver fichero

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

Ver fichero

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

10
make-domains.sh Archivo ejecutable
Ver fichero

@@ -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 Archivo normal
Ver fichero

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