equal
deleted
inserted
replaced
15 customer="$1"; shift |
15 customer="$1"; shift |
16 start=$(date -I) |
16 start=$(date -I) |
17 |
17 |
18 # config |
18 # config |
19 source dnstools.conf |
19 source dnstools.conf |
|
20 |
|
21 primary=$PRIMARY |
|
22 primary_ip=${PRIMARY_IP:-$(dig +short $primary)} |
20 |
23 |
21 secondary=$SECONDARY |
24 secondary=$SECONDARY |
22 secondary_ip=${SECONDARY_IP:-$(dig +short $secondary)} |
25 secondary_ip=${SECONDARY_IP:-$(dig +short $secondary)} |
23 |
26 |
24 this_host=${THIS_HOST:-$(hostname -f)} |
27 this_host=${THIS_HOST:-$(hostname -f)} |
70 test -f $config && { echo "$config exists. Skipping $domain" >&2; continue; } |
73 test -f $config && { echo "$config exists. Skipping $domain" >&2; continue; } |
71 |
74 |
72 cat <<xxx >$zonefile |
75 cat <<xxx >$zonefile |
73 \$ORIGIN $domain. |
76 \$ORIGIN $domain. |
74 \$TTL 1d |
77 \$TTL 1d |
75 @ IN SOA $this_host. $hostmaster. ( |
78 @ IN SOA $primary. $hostmaster. ( |
76 $(date +%Y%m%d00) ; serial |
79 $(date +%Y%m%d00) ; serial |
77 1d ; refresh |
80 1d ; refresh |
78 2h ; retry |
81 2h ; retry |
79 7d ; expire |
82 7d ; expire |
80 1d ; default ttl |
83 1d ; default ttl |
87 IN NS $primary. |
90 IN NS $primary. |
88 IN NS $secondary. |
91 IN NS $secondary. |
89 |
92 |
90 xxx |
93 xxx |
91 |
94 |
92 cat <<xxx >$config |
95 tpage \ |
93 zone "$domain" { |
96 --define domain="$domain" \ |
94 // Start: $start |
97 --define start="$start" \ |
95 // Invoice: $customer |
98 --define customer="$customer" \ |
96 // UTF8: $utf8domain |
99 --define utf8domain="$utf8domain" \ |
97 type master; |
100 --define file="$master_dir/$domain/$domain" \ |
98 file "$master_dir/$domain/$domain.signed"; |
101 --define primary_ip="$primary_ip" \ |
99 allow-transfer { $secondary_ip; }; |
102 --define secondary_ip="$secondary_ip" \ |
100 allow-query { any; }; |
103 templates/named.conf.zone \ |
101 }; |
104 >$config |
102 |
105 |
103 xxx |
|
104 done |
106 done |
105 |
107 |
106 |
108 |