From 56cdadbe5c9f61a0ff68c0a14a5f39fe2d7454d8 Mon Sep 17 00:00:00 2001 From: dpeca Date: Tue, 14 Mar 2017 01:56:28 +0100 Subject: [PATCH] Making sure is always reseted in possible loops --- func/domain.sh | 10 ++++------ func/rebuild.sh | 5 ++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/func/domain.sh b/func/domain.sh index fd205a2b..53f41270 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 63143472..e5ab182a 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" \