refactoring: log_event(), is_format_valid()

This commit is contained in:
Serghey Rodin 2016-06-24 16:31:43 +03:00
commit a61a6e979e
52 changed files with 582 additions and 1170 deletions

View file

@ -24,9 +24,7 @@ source $VESTA/conf/vesta.conf
is_user_free() {
check_sysuser=$(cut -f 1 -d : /etc/passwd | grep -w "$user" )
if [ ! -z "$check_sysuser" ] || [ -e "$USER_DATA" ]; then
echo "Error: user $user exists"
log_event "$E_EXISTS" "$ARGUMENTS"
exit $E_EXISTS
check_result $E_EXISTS "user $user exists"
fi
}
@ -155,7 +153,7 @@ $pkg_data
CONTACT='$email'
CRON_REPORTS='yes'
MD5='$(awk -v user=$user -F : 'user == $1 {print $2}' /etc/shadow)'
RKEY='$(gen_password)'
RKEY='$(generate_password)'
SUSPENDED='no'
SUSPENDED_USERS='0'
SUSPENDED_WEB='0'