mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 13:24:24 -07:00
idn support for awstats
This commit is contained in:
parent
fb216fc3ee
commit
ebdbe965e8
5 changed files with 14 additions and 5 deletions
|
@ -66,7 +66,8 @@ cat $WEBTPL/$type.tpl |\
|
||||||
> $HOMEDIR/$user/conf/web/$type.$domain.conf
|
> $HOMEDIR/$user/conf/web/$type.$domain.conf
|
||||||
|
|
||||||
if [ "$type" == 'awstats' ]; then
|
if [ "$type" == 'awstats' ]; then
|
||||||
ln -s $HOMEDIR/$user/conf/web/$type.$domain.conf /etc/awstats/
|
ln -s $HOMEDIR/$user/conf/web/$type.$domain.conf \
|
||||||
|
/etc/awstats/$type.$domain_idn.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -77,6 +77,11 @@ cat $WEBTPL/$type.tpl |\
|
||||||
-e "s/%alias_idn%/${aliases_idn//,/ }/g" \
|
-e "s/%alias_idn%/${aliases_idn//,/ }/g" \
|
||||||
> $HOMEDIR/$user/conf/web/$type.$domain.conf
|
> $HOMEDIR/$user/conf/web/$type.$domain.conf
|
||||||
|
|
||||||
|
if [ "$type" == 'awstats' ]; then
|
||||||
|
ln -s $HOMEDIR/$user/conf/web/$type.$domain.conf \
|
||||||
|
/etc/awstats/$type.$domain_idn.conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
# Argument defenition
|
# Argument defenition
|
||||||
user=$1
|
user=$1
|
||||||
domain=$(idn -t --quiet -u "$2" )
|
domain=$(idn -t --quiet -u "$2" )
|
||||||
|
domain_idn=$(idn -t --quiet -a "$domain")
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
source $VESTA/conf/vesta.conf
|
source $VESTA/conf/vesta.conf
|
||||||
|
@ -48,7 +49,7 @@ stats_dir="$HOMEDIR/$user/web/$domain/stats"
|
||||||
rm -rf $stats_dir/*
|
rm -rf $stats_dir/*
|
||||||
|
|
||||||
# Deleting config
|
# Deleting config
|
||||||
rm -f /etc/awstats/$STATS.$domain.conf
|
rm -f /etc/awstats/$STATS.$domain_idn.conf
|
||||||
rm -f $HOMEDIR/$user/conf/web/$STATS.$domain.conf
|
rm -f $HOMEDIR/$user/conf/web/$STATS.$domain.conf
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -136,9 +136,11 @@ for domain in $(shell_list) ; do
|
||||||
-e "s/%alias_idn%/${aliases_idn//,/ }/g" \
|
-e "s/%alias_idn%/${aliases_idn//,/ }/g" \
|
||||||
> $HOMEDIR/$user/conf/web/$STATS.$domain.conf
|
> $HOMEDIR/$user/conf/web/$STATS.$domain.conf
|
||||||
|
|
||||||
|
|
||||||
if [ "$STATS" == 'awstats' ]; then
|
if [ "$STATS" == 'awstats' ]; then
|
||||||
if [ ! -e "/etc/awstats/$STATS.$domain.conf" ]; then
|
if [ ! -e "/etc/awstats/$STATS.$domain_idn.conf" ]; then
|
||||||
ln -s $HOMEDIR/$user/conf/web/$STATS.$domain.conf /etc/awstats/
|
ln -s $HOMEDIR/$user/conf/web/$STATS.$domain.conf \
|
||||||
|
/etc/awstats/$STATS.$domain_idn.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ build_webalizer() {
|
||||||
build_awstats() {
|
build_awstats() {
|
||||||
awstats="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl"
|
awstats="/usr/share/awstats/wwwroot/cgi-bin/awstats.pl"
|
||||||
wwwroot="/usr/share/awstats/wwwroot"
|
wwwroot="/usr/share/awstats/wwwroot"
|
||||||
opts="-config=$domain -staticlinks -update -output"
|
opts="-config=$domain_idn -staticlinks -update -output"
|
||||||
month=$(date "+%Y-%m")
|
month=$(date "+%Y-%m")
|
||||||
output='alldomains allhosts lasthosts unknownip allrobots lastrobots
|
output='alldomains allhosts lasthosts unknownip allrobots lastrobots
|
||||||
urldetail urlentry urlexit osdetail browserdetail unknownbrowser
|
urldetail urlentry urlexit osdetail browserdetail unknownbrowser
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue