mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 10:37:39 -07:00
web function refactoring
This commit is contained in:
parent
73b63016d4
commit
872cd3ac45
20 changed files with 744 additions and 1239 deletions
|
@ -30,7 +30,7 @@ source $VESTA/conf/vesta.conf
|
|||
#----------------------------------------------------------#
|
||||
|
||||
check_args '3' "$#" 'USER DOMAIN TYPE'
|
||||
validate_format 'user' 'domain'
|
||||
is_format_valid 'user' 'domain'
|
||||
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
|
||||
is_type_valid "$STATS_SYSTEM" "$type"
|
||||
is_object_valid 'user' 'USER' "$user" "$user"
|
||||
|
@ -47,10 +47,8 @@ is_object_value_empty 'web' 'DOMAIN' "$domain" '$STATS'
|
|||
# Parse aliases
|
||||
get_domain_values 'web'
|
||||
|
||||
# Preparing domain values for the template substitution
|
||||
upd_web_domain_values
|
||||
|
||||
# Adding statistic config
|
||||
prepare_web_domain_values
|
||||
cat $WEBTPL/$type/$type.tpl |\
|
||||
sed -e "s|%ip%|$ip|g" \
|
||||
-e "s|%web_port%|$WEB_PORT|g" \
|
||||
|
@ -90,7 +88,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$STATS' "$type"
|
|||
|
||||
# Logging
|
||||
log_history "enabled web log analyzer for $domain"
|
||||
log_event "$OK" "$EVENT"
|
||||
log_event "$OK" "$ARGUMENTS"
|
||||
|
||||
# Build stats
|
||||
exec $BIN/v-update-web-domain-stat $user $domain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue