mirror of
https://github.com/myvesta/vesta
synced 2025-08-20 21:34:12 -07:00
Making sure domain_idn is always set
This commit is contained in:
parent
8ae70316e9
commit
6d88ca31c3
74 changed files with 142 additions and 1 deletions
|
@ -172,6 +172,10 @@ add_web_config() {
|
|||
conf="$HOMEDIR/$user/conf/web/s$1.conf"
|
||||
fi
|
||||
|
||||
if [ -z "$domain_idn" ]; then
|
||||
format_domain_idn
|
||||
fi
|
||||
|
||||
cat $WEBTPL/$1/$WEB_BACKEND/$2 | \
|
||||
sed -e "s|%ip%|$local_ip|g" \
|
||||
-e "s|%domain%|$domain|g" \
|
||||
|
@ -228,6 +232,9 @@ get_web_config_lines() {
|
|||
check_result $E_PARSING "can't parse template $1"
|
||||
fi
|
||||
|
||||
if [ -z "$domain_idn" ]; then
|
||||
format_domain_idn
|
||||
fi
|
||||
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 :)
|
||||
|
|
|
@ -864,6 +864,9 @@ format_domain() {
|
|||
}
|
||||
|
||||
format_domain_idn() {
|
||||
if [ -z "$domain_idn" ]; then
|
||||
domain_idn=$domain
|
||||
fi
|
||||
if [[ "$domain_idn" = *[![:ascii:]]* ]]; then
|
||||
domain_idn=$(idn -t --quiet -a $domain_idn)
|
||||
fi
|
||||
|
|
|
@ -227,6 +227,9 @@ rebuild_web_domain_conf() {
|
|||
|
||||
# Adding web stats parser
|
||||
if [ ! -z "$STATS" ]; then
|
||||
if [ -z "$domain_idn" ]; then
|
||||
format_domain_idn
|
||||
fi
|
||||
cat $WEBTPL/$STATS/$STATS.tpl |\
|
||||
sed -e "s|%ip%|$local_ip|g" \
|
||||
-e "s|%web_system%|$WEB_SYSTEM|g" \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue