mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
refactoring: log_event(), is_format_valid()
This commit is contained in:
parent
6e0ef668bb
commit
e05dca61a6
211 changed files with 756 additions and 1091 deletions
|
@ -30,7 +30,7 @@ htpasswd="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.$domain.htpasswd"
|
|||
#----------------------------------------------------------#
|
||||
|
||||
check_args '3' "$#" 'USER DOMAIN AUTH_USER [RESTART]'
|
||||
validate_format 'user' 'domain'
|
||||
is_format_valid 'user' 'domain'
|
||||
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
|
||||
is_object_valid 'user' 'USER' "$user"
|
||||
is_object_unsuspended 'user' 'USER' "$user"
|
||||
|
@ -40,7 +40,7 @@ is_password_valid
|
|||
get_domain_values 'web'
|
||||
if [ -z "$(echo "$AUTH_USER" |tr : '\n' |grep ^$auth_user$)" ]; then
|
||||
echo "Error: auth user $auth_user doesn't exist"
|
||||
log_event "$E_NOTEXIST" "$EVENT"
|
||||
log_event "$E_NOTEXIST" "$ARGUMENTS"
|
||||
exit $E_NOTEXIST
|
||||
fi
|
||||
|
||||
|
@ -82,6 +82,6 @@ update_object_value 'web' 'DOMAIN' "$domain" '$AUTH_HASH' "$auth_hash"
|
|||
|
||||
# Logging
|
||||
log_history "changed auth user $httpauth_user password on $domain"
|
||||
log_event "$OK" "$EVENT"
|
||||
log_event "$OK" "$ARGUMENTS"
|
||||
|
||||
exit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue