mirror of
https://github.com/myvesta/vesta
synced 2025-07-15 01:23:23 -07:00
replaced underscore with dash in api syscalls
This commit is contained in:
parent
7ed705cee7
commit
b6b7eacadb
283 changed files with 438 additions and 412 deletions
61
bin/v-delete-web-domain-stats-user
Executable file
61
bin/v-delete-web-domain-stats-user
Executable file
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
# info: disable webdomain stats authentication support
|
||||
# options: user domain
|
||||
#
|
||||
# The function removes authentication of statistics system. If the script is
|
||||
# called without naming a certain user, all users will be removed. After
|
||||
# deleting all of them statistics will be accessible for view without an
|
||||
# authentication.
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Variable&Function #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Argument defenition
|
||||
user=$1
|
||||
domain=$(idn -t --quiet -u "$2" )
|
||||
|
||||
# Includes
|
||||
source $VESTA/conf/vesta.conf
|
||||
source $VESTA/func/main.sh
|
||||
source $VESTA/func/domain.sh
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Verifications #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
check_args '2' "$#" 'user domain'
|
||||
validate_format 'user' 'domain'
|
||||
is_system_enabled "$WEB_SYSTEM"
|
||||
is_object_valid 'user' 'USER' "$user"
|
||||
is_object_unsuspended 'user' 'USER' "$user"
|
||||
is_object_valid 'web' 'DOMAIN' "$domain"
|
||||
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
||||
is_object_value_exist 'web' 'DOMAIN' "$domain" '$STATS_USER'
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Action #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Definining statistic dir
|
||||
rm -f $HOMEDIR/$user/web/$domain/stats/.htpasswd
|
||||
rm -f $HOMEDIR/$user/web/$domain/stats/.htaccess
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Vesta #
|
||||
#----------------------------------------------------------#
|
||||
|
||||
# Update config
|
||||
update_object_value 'web' 'DOMAIN' "$domain" '$STATS_USER' ''
|
||||
update_object_value 'web' 'DOMAIN' "$domain" '$STATS_CRYPT' ''
|
||||
|
||||
|
||||
# Logging
|
||||
log_history "disabled web stats password protection for $domain"
|
||||
log_event "$OK" "$EVENT"
|
||||
|
||||
exit
|
Loading…
Add table
Add a link
Reference in a new issue