Skip to content
Snippets Groups Projects
Commit 36111204 authored by Bob Mottram's avatar Bob Mottram
Browse files

Creating matrix users

parent 47617722
No related branches found
No related tags found
No related merge requests found
......@@ -427,16 +427,17 @@ function add_user_matrix {
"${PROJECT_NAME}-pass" -u "$new_username" -a matrix -p "$new_user_password"
if [[ "$new_username" != "$MY_USERNAME" ]]; then
echo 'no' | register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" http://localhost:${MATRIX_PORT}
else
echo 'yes' | register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a http://localhost:${MATRIX_PORT}
fi
# shellcheck disable=SC2181
if [ ! "$?" = "0" ]; then
echo "1"
if ! register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" http://localhost:${MATRIX_PORT}; then
echo "1"
return
fi
else
echo "0"
if ! register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" -a http://localhost:${MATRIX_PORT}; then
echo "1"
return
fi
fi
echo "0"
}
function install_interactive_matrix {
......@@ -956,7 +957,7 @@ function install_matrix {
increment_app_install_progress
matrix_wait_for_database
#matrix_wait_for_database
increment_app_install_progress
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment