This repository has been archived on 2024-10-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
rzh-server/dns/adddomain
2018-06-04 14:27:52 +02:00

21 lines
371 B
Bash

#!/bin/bash
cat > /etc/bind/named.conf.domains/$1.conf <<EOF
zone "$1" {
type master;
file "/etc/bind/named.conf.domain/db.$1";
};
EOF
cat > /etc/bind/named.conf.domain/db.$1 <<EOF
$TTL 604800
@ IN SOA $1. root.$1. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN A $2
EOF