mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
check_result function
This commit is contained in:
parent
062b7e81f0
commit
91a804c1c8
66 changed files with 204 additions and 404 deletions
|
@ -58,11 +58,7 @@ shell=$(grep -w "$shell_conf" /etc/shells |head -n1)
|
|||
|
||||
# Adding user
|
||||
/usr/sbin/useradd "$user" -s "$shell" -c "$email" -m -d "$HOMEDIR/$user"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: user creation failed"
|
||||
log_event "$E_INVALID" "$EVENT"
|
||||
exit $E_INVALID
|
||||
fi
|
||||
check_result $? "user creation failed" $E_INVALID
|
||||
|
||||
# Adding password
|
||||
echo "$user:$password" | /usr/sbin/chpasswd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue