diff --git a/func/domain.sh b/func/domain.sh index fd205a2bc..53f412707 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -172,9 +172,8 @@ add_web_config() { conf="$HOMEDIR/$user/conf/web/s$1.conf" fi - if [ -z "$domain_idn" ]; then - format_domain_idn - fi + domain_idn=$domain + format_domain_idn cat $WEBTPL/$1/$WEB_BACKEND/$2 | \ sed -e "s|%ip%|$local_ip|g" \ @@ -232,9 +231,8 @@ get_web_config_lines() { check_result $E_PARSING "can't parse template $1" fi - if [ -z "$domain_idn" ]; then - format_domain_idn - fi + domain_idn=$domain + format_domain_idn vhost_lines=$(grep -niF "name $domain_idn" $2) vhost_lines=$(echo "$vhost_lines" |egrep "$domain_idn($| |;)") #" vhost_lines=$(echo "$vhost_lines" |cut -f 1 -d :) diff --git a/func/rebuild.sh b/func/rebuild.sh index 63143472f..e5ab182a9 100644 --- a/func/rebuild.sh +++ b/func/rebuild.sh @@ -227,9 +227,8 @@ rebuild_web_domain_conf() { # Adding web stats parser if [ ! -z "$STATS" ]; then - if [ -z "$domain_idn" ]; then - format_domain_idn - fi + domain_idn=$domain + format_domain_idn cat $WEBTPL/$STATS/$STATS.tpl |\ sed -e "s|%ip%|$local_ip|g" \ -e "s|%web_system%|$WEB_SYSTEM|g" \