Enhanced the user creation way.
This commit is contained in:
@@ -112,9 +112,8 @@ We can't execute commands inside it, you can run it with:
|
||||
|
||||
# Execute the command in the container
|
||||
OUTPUT=$(docker exec "$CONTAINER_NAME" bash -c "$COMMAND" 2>&1)
|
||||
|
||||
local EXIT_CODE=$?
|
||||
|
||||
|
||||
# Check if the command succeeded
|
||||
if [[ $EXIT_CODE -eq 0 ]]; then
|
||||
EXECUTION_MESSAGE="$OUTPUT" # Return the output
|
||||
@@ -174,7 +173,7 @@ create_user(){
|
||||
local RETURN_CODE=$?
|
||||
|
||||
if [[ $RETURN_CODE -eq 0 ]]; then
|
||||
print_header $EXECUTION_MESSAGE
|
||||
print_header "$EXECUTION_MESSAGE"
|
||||
else
|
||||
print_header "Couldn't create the user due to the above error."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user