70 echo "$domain ($utf8domain)" |
70 echo "$domain ($utf8domain)" |
71 |
71 |
72 test -f $zonefile && { echo "$zonefile exists. Skipping $domain" >&2; continue; } |
72 test -f $zonefile && { echo "$zonefile exists. Skipping $domain" >&2; continue; } |
73 test -f $config && { echo "$config exists. Skipping $domain" >&2; continue; } |
73 test -f $config && { echo "$config exists. Skipping $domain" >&2; continue; } |
74 |
74 |
75 cat <<xxx >$zonefile |
75 tpage \ |
76 \$ORIGIN $domain. |
76 --define start="$start" \ |
77 \$TTL 1d |
77 --define domain="$domain" \ |
78 @ IN SOA $primary. $hostmaster. ( |
78 --define time="$(date +%Y%m%d00)" \ |
79 $(date +%Y%m%d00) ; serial |
79 --define primary="$primary" \ |
80 1d ; refresh |
80 --define secondary="$secondary" \ |
81 2h ; retry |
81 --define hostmaster="$hostmaster" \ |
82 7d ; expire |
82 --define customer="$customer" \ |
83 1d ; default ttl |
83 --define utf8domain="$utf8domain" \ |
84 ) |
84 templates/named.zone \ |
85 |
85 >$zonefile |
86 IN TXT "invoice: $customer" |
|
87 IN TXT "start: $start" |
|
88 IN TXT "utf8: $utf8domain" |
|
89 |
|
90 IN NS $primary. |
|
91 IN NS $secondary. |
|
92 |
|
93 xxx |
|
94 |
86 |
95 tpage \ |
87 tpage \ |
96 --define domain="$domain" \ |
88 --define domain="$domain" \ |
97 --define start="$start" \ |
89 --define start="$start" \ |
98 --define customer="$customer" \ |
90 --define customer="$customer" \ |
99 --define utf8domain="$utf8domain" \ |
91 --define utf8domain="$utf8domain" \ |
100 --define file="$master_dir/$domain/$domain" \ |
92 --define file="$master_dir/$domain/$domain" \ |
101 --define primary_ip="$primary_ip" \ |
93 --define primary_ip="$primary_ip" \ |
102 --define secondary_ip="$secondary_ip" \ |
94 --define secondary_ip="$secondary_ip" \ |
103 templates/named.conf.zone \ |
95 templates/named.config \ |
104 >$config |
96 >$config |
105 |
97 |
106 done |
98 done |
107 |
99 |
108 |
100 |