Browse Source

Update path for webstats configuration file

Kristan Kenney 7 years ago
parent
commit
445bd57af7

+ 1 - 1
bin/v-change-web-domain-stats

@@ -61,7 +61,7 @@ stats_dir="$HOMEDIR/$user/web/$domain/stats"
 rm -rf $stats_dir/*
 
 # Deleting config
-rm -f $HOMEDIR/$user/conf/web/$STATS.$domain.conf
+rm -f $HOMEDIR/$user/conf/web/$domain/$STATS.conf
 
 # Adding statistic config
 prepare_web_domain_values

+ 1 - 1
bin/v-delete-web-domain

@@ -84,7 +84,7 @@ fi
 # Deleting web stats
 if [ ! -z "$STATS" ] && [ "$STATS" != 'no' ]; then
     sed -i "/ $domain$/d" $HESTIA/data/queue/webstats.pipe
-    rm -f $HOMEDIR/$user/conf/web/$STATS.$domain.conf
+    rm -f $HOMEDIR/$user/conf/web/$domain/$STATS.conf
     rm -f /etc/awstats/$STATS.$domain.conf
 fi
 

+ 1 - 1
bin/v-delete-web-domain-stats

@@ -54,7 +54,7 @@ rm -rf $stats_dir/*
 
 # Deleting config
 rm -f /etc/awstats/$STATS.$domain_idn.conf
-rm -f $HOMEDIR/$user/conf/web/$STATS.$domain.conf
+rm -f $HOMEDIR/$user/conf/web/$domain/$STATS.conf
 
 
 #----------------------------------------------------------#

+ 1 - 1
bin/v-update-web-domain-stat

@@ -45,7 +45,7 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$STATS'
 get_domain_values 'web'
 
 # Checking config
-config="$HOMEDIR/$user/conf/web/$STATS.$domain.conf"
+config="$HOMEDIR/$user/conf/web/$domain/$STATS.conf"
 if [ ! -e "$config" ]; then
     check_result $E_NOTEXISTS "$config doesn't exist"
 fi

+ 2 - 2
func/rebuild.sh

@@ -253,10 +253,10 @@ rebuild_web_domain_conf() {
                 -e "s|%home%|$HOMEDIR|g" \
                 -e "s|%alias%|${aliases//,/ }|g" \
                 -e "s|%alias_idn%|${aliases_idn//,/ }|g" \
-                > $HOMEDIR/$user/conf/web/$STATS.$domain.conf
+                > $HOMEDIR/$user/conf/web/$domain/$STATS.conf
         if [ "$STATS" == 'awstats' ]; then
             if [ ! -e "/etc/awstats/$STATS.$domain_idn.conf" ]; then
-                ln -f -s $HOMEDIR/$user/conf/web/$STATS.$domain.conf \
+                ln -f -s $HOMEDIR/$user/conf/web/$domain/$STATS.conf \
                     /etc/awstats/$STATS.$domain_idn.conf
             fi
         fi