We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a22d8e commit 6af2fc6Copy full SHA for 6af2fc6
bin/v-add-web-domain-stats
@@ -55,6 +55,13 @@ get_domain_values 'web'
55
56
# Adding statistic config
57
prepare_web_domain_values
58
+
59
+if [ -z "${aliases//,/ }" ]; then
60
+ stats_alias="localhost"
61
+else
62
+ stats_alias=${aliases_idn//,/ }
63
+fi
64
65
cat $WEBTPL/$type/$type.tpl |\
66
sed -e "s|%ip%|$ip|g" \
67
-e "s|%web_port%|$WEB_PORT|g" \
@@ -69,7 +76,7 @@ cat $WEBTPL/$type/$type.tpl |\
69
76
-e "s|%user%|$user|g" \
70
77
-e "s|%home%|$HOMEDIR|g" \
71
78
-e "s|%alias%|${aliases//,/ }|g" \
72
- -e "s|%alias_idn%|${aliases_idn//,/ }|g" \
79
+ -e "s|%alias_idn%|$stats_alias|g" \
73
80
> $HOMEDIR/$user/conf/web/$domain/$type.conf
74
81
75
82
if [ "$type" == 'awstats' ]; then
0 commit comments