Skip to content

Commit 56cdadb

Browse files
committed
Making sure is always reseted in possible loops
1 parent 887ac8a commit 56cdadb

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

func/domain.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,8 @@ add_web_config() {
172172
conf="$HOMEDIR/$user/conf/web/s$1.conf"
173173
fi
174174

175-
if [ -z "$domain_idn" ]; then
176-
format_domain_idn
177-
fi
175+
domain_idn=$domain
176+
format_domain_idn
178177

179178
cat $WEBTPL/$1/$WEB_BACKEND/$2 | \
180179
sed -e "s|%ip%|$local_ip|g" \
@@ -232,9 +231,8 @@ get_web_config_lines() {
232231
check_result $E_PARSING "can't parse template $1"
233232
fi
234233

235-
if [ -z "$domain_idn" ]; then
236-
format_domain_idn
237-
fi
234+
domain_idn=$domain
235+
format_domain_idn
238236
vhost_lines=$(grep -niF "name $domain_idn" $2)
239237
vhost_lines=$(echo "$vhost_lines" |egrep "$domain_idn($| |;)") #"
240238
vhost_lines=$(echo "$vhost_lines" |cut -f 1 -d :)

func/rebuild.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,8 @@ rebuild_web_domain_conf() {
227227

228228
# Adding web stats parser
229229
if [ ! -z "$STATS" ]; then
230-
if [ -z "$domain_idn" ]; then
231-
format_domain_idn
232-
fi
230+
domain_idn=$domain
231+
format_domain_idn
233232
cat $WEBTPL/$STATS/$STATS.tpl |\
234233
sed -e "s|%ip%|$local_ip|g" \
235234
-e "s|%web_system%|$WEB_SYSTEM|g" \

0 commit comments

Comments
 (0)