From fda044bb92feefa84eeac321916fbc018ad33bc3 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Wed, 25 Jul 2012 10:11:57 +0300 Subject: [PATCH] removed dns templates from user menu --- bin/v_add_dns_domain | 2 +- bin/v_add_dns_domain_record | 10 ++++++---- web/templates/admin/add_dns.html | 2 +- web/templates/user/add_dns.html | 20 ++------------------ 4 files changed, 10 insertions(+), 24 deletions(-) diff --git a/bin/v_add_dns_domain b/bin/v_add_dns_domain index 8d15b8e8..416e5e53 100755 --- a/bin/v_add_dns_domain +++ b/bin/v_add_dns_domain @@ -1,6 +1,6 @@ #!/bin/bash # info: add dns domain -# options: user domain ip [template] [ns1] [ns2] [ns3] [ns4] +# options: user domain ip [template] [ns1] [ns2] [ns3] [ns4] [restart] # # The function adds DNS zone with records defined in the template. If the exp # argument isn't stated, the expiration date value will be set to next year. diff --git a/bin/v_add_dns_domain_record b/bin/v_add_dns_domain_record index b4b3c972..18624104 100755 --- a/bin/v_add_dns_domain_record +++ b/bin/v_add_dns_domain_record @@ -1,6 +1,6 @@ #!/bin/bash # info: add dns domain record -# options: user domain record type value [priority] [id] +# options: user domain record type value [priority] [id] [restart] # # The call is used for adding new DNS record. Complex records of TXT, MX and # SRV types can be used by a filling in the 'value' argument. The function also @@ -24,7 +24,7 @@ dvalue=$(idn -t --quiet -u "$5" ) dvalue=$(echo "$dvalue" | tr '[:upper:]' '[:lower:]') priority=$6 id=$7 - +restart=$8 # Includes source $VESTA/conf/vesta.conf @@ -36,7 +36,7 @@ source $VESTA/func/domain.sh # Verifications # #----------------------------------------------------------# -check_args '5' "$#" 'user domain record type value [priority] [id]' +check_args '5' "$#" 'user domain record type value [priority] [id] [restart]' validate_format 'user' 'domain' 'record' 'rtype' 'dvalue' is_system_enabled "$DNS_SYSTEM" is_object_valid 'user' 'USER' "$user" @@ -81,7 +81,9 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records" increase_user_value "$user" '$U_DNS_RECORDS' # Restart named -$BIN/v_restart_dns "$EVENT" +if [ "$restart" != 'no' ]; then + $BIN/v_restart_dns "$EVENT" +fi # Logging log_history "$EVENT" diff --git a/web/templates/admin/add_dns.html b/web/templates/admin/add_dns.html index 288f581f..3841c3b7 100644 --- a/web/templates/admin/add_dns.html +++ b/web/templates/admin/add_dns.html @@ -52,7 +52,7 @@ TTL NameServers + Name Servers Advanced Options ⇢ - - - + +
Template
Domain Expiriation
Domain Expiriation
TTL
NameServers
Name Servers