File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: add log analyzer to generate domain statitics
2+ # info: add log analyzer to generate domain statistics
33# options: USER DOMAIN TYPE
44# labels: web
55#
Original file line number Diff line number Diff line change @@ -52,8 +52,8 @@ conf_dir="$HOMEDIR/$user/conf/web"
5252
5353# Adding htaccess file
5454if [ " $WEB_SYSTEM " = ' nginx' ]; then
55- echo " auth_basic \" Web Statistics\" ;" > $conf_dir / $domain . auth
56- echo " auth_basic_user_file $stats_dir /.htpasswd;" >> $conf_dir / $domain . auth
55+ echo " auth_basic \" Web Statistics\" ;" > $stats_dir / auth.conf
56+ echo " auth_basic_user_file $stats_dir /.htpasswd;" >> $stats_dir / auth.conf
5757else
5858 echo " AuthUserFile $stats_dir /.htpasswd" > $stats_dir /.htaccess
5959 echo " AuthName \" Web Statistics\" " >> $stats_dir /.htaccess
Original file line number Diff line number Diff line change 11#! /bin/bash
2- # info: disable webdomain stats authentication support
2+ # info: disable web domain stats authentication support
33# options: USER DOMAIN [RESTART]
44# labels: web
55#
@@ -47,14 +47,14 @@ check_hestia_demo_mode
4747# Action #
4848# ----------------------------------------------------------#
4949
50- # Defining statistic dir
51- rm -f $HOMEDIR /$user /web/$domain /stats/.htpasswd
52- rm -f $HOMEDIR /$user /web/$domain /stats/.htaccess
50+ # Deleting statistic dir
51+ stats_dir=" $HOMEDIR /$user /web/$domain /stats"
52+ rm -f $stats_dir /.htpasswd
53+ rm -f $stats_dir /.htaccess
5354
5455# Deleting nginx auth config
5556if [ " $WEB_SYSTEM " = ' nginx' ]; then
56- conf_dir=" $HOMEDIR /$user /conf/web"
57- rm -f $conf_dir /$domain .auth 2> /dev/null
57+ rm -f $stats_dir /auth.conf 2> /dev/null
5858 $BIN /v-restart-web $restart
5959 check_result $? " Web restart failed" > /dev/null
6060fi
You can’t perform that action at this time.
0 commit comments