diff --git a/bin/v-change-dns-domain-ip b/bin/v-change-dns-domain-ip index 6f4c6d935..ce671b045 100755 --- a/bin/v-change-dns-domain-ip +++ b/bin/v-change-dns-domain-ip @@ -39,11 +39,15 @@ is_object_unsuspended 'dns' 'DOMAIN' "$domain" # Action # #----------------------------------------------------------# +# Get old ip +get_domain_values 'dns' +old=$IP + # Changing ip update_object_value 'dns' 'DOMAIN' "$domain" '$IP' "$ip" # Changing records -sed -i "s/$old_ip/$ip/g" $USER_DATA/dns/$domain.conf +sed -i "s/$old/$ip/g" $USER_DATA/dns/$domain.conf # Updating zone update_domain_zone