From 3ac0abe6c0317c49039c17d0e7212231e5c8eeba Mon Sep 17 00:00:00 2001 From: "Made I.T" Date: Mon, 23 Oct 2017 14:26:15 +0200 Subject: [PATCH] Update v-change-web-domain-tpl --- bin/v-change-web-domain-tpl | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/bin/v-change-web-domain-tpl b/bin/v-change-web-domain-tpl index ca847293..82f994df 100755 --- a/bin/v-change-web-domain-tpl +++ b/bin/v-change-web-domain-tpl @@ -51,11 +51,28 @@ is_web_template_valid "$template" # Parsing domain values get_domain_values 'web' local_ip=$(get_real_ip $IP) +ipv6=$IP6 + +# Deleting vhost configuration IPv4 +if [ ! -z "$local_ip" ]; then + old=$local_ip + del_web_config "$WEB_SYSTEM" "$TPL.tpl" + + # Deleting SSL configuration and certificates + if [ "$SSL" = 'yes' ]; then + del_web_config "$WEB_SYSTEM" "$TPL.stpl"- + fi +fi # Deleting domain -del_web_config "$WEB_SYSTEM" "$TPL.tpl" -if [ "$SSL" = 'yes' ]; then - del_web_config "$WEB_SYSTEM" "$TPL.stpl" +if [ ! -z "$IP6" ]; then + old=$IP6 + del_web_config "$WEB_SYSTEM" "$TPL.tpl" + + # Deleting SSL configuration and certificates + if [ "$SSL" = 'yes' ]; then + del_web_config "$WEB_SYSTEM" "$TPL.stpl" + fi fi # Defining variables for new vhost config