mirror of
https://github.com/myvesta/vesta
synced 2025-08-21 05:44:08 -07:00
removed dns templates from user menu
This commit is contained in:
parent
fe71ef2f08
commit
fda044bb92
4 changed files with 10 additions and 24 deletions
|
@ -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.
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue