X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fsystem%2Fadd_domain.sh;h=0dabaf2e7b4234392fe214883a4fdd6c3e07e94b;hb=71cd14a5eeb5b97d3493350ab0222ad2e130ee5c;hp=00cf6de043a739083202e0a9a4757e5cdae1d69b;hpb=f15007a6d97cb4158fed81ab2d996f8d8df1b7c3;p=feisty_meow.git diff --git a/scripts/system/add_domain.sh b/scripts/system/add_domain.sh index 00cf6de0..0dabaf2e 100644 --- a/scripts/system/add_domain.sh +++ b/scripts/system/add_domain.sh @@ -52,13 +52,12 @@ function write_new_domain_file() IN NS ${MAIN_NAME_SERVER}. IN MX 10 ${MAIL_SERVER}. -${domain}. IN A ${IP_ADDRESS} +${domain_name}. IN A ${IP_ADDRESS} IN HINFO \"linux server\" \"${DISTRO}\" -" -#fix -# >"$domain_file" +" >"$domain_file" } +# hooks up a new config file into bind's list of zones. function add_zone_for_new_domain() { local domain_name="$1"; shift @@ -68,18 +67,17 @@ function add_zone_for_new_domain() echo "adding a new domain configured by ${domain_file} into" echo "the named.conf.local configuration file." -# need to write the reference to the new conf file in the zone list. - -echo " + # append the reference to the new conf file in the zone list. + echo " zone \"${domain_name}\" in { file \"${domain_file}\"; type master; allow-query { any; }; }; -" -#fix -#>> /etc/bind9/named.conf.local +//////////////////////////////////////////////////////////////////////////// + +" >> /etc/bind/named.conf.local } # adds a new subdomain under a containing domain. @@ -115,9 +113,7 @@ function add_new_subdomain() echo " ${subdomain}.${containing_domain}. IN A ${IP_ADDRESS} IN HINFO \"linux server\" \"${DISTRO}\" -" -#fix -#>> /etc/bind/${containing_domain}.conf +" >> /etc/bind/${containing_domain}.conf }