removed dns templates from user menu

This commit is contained in:
Serghey Rodin 2012-07-25 10:11:57 +03:00
commit fda044bb92
4 changed files with 10 additions and 24 deletions

View file

@ -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.

View file

@ -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"