Read matrix domain

This commit is contained in:
Bob Mottram 2017-08-17 18:19:06 +01:00
parent 81295daf47
commit a7a9981d0e
1 changed files with 2 additions and 0 deletions

View File

@ -314,6 +314,7 @@ function add_user_matrix {
new_user_password="$2" new_user_password="$2"
is_admin_user='-a' is_admin_user='-a'
read_config_param MY_USERNAME
if [[ "$new_username" != "$MY_USERNAME" ]]; then if [[ "$new_username" != "$MY_USERNAME" ]]; then
is_admin_user='' is_admin_user=''
fi fi
@ -321,6 +322,7 @@ function add_user_matrix {
${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password" ${PROJECT_NAME}-pass -u $new_username -a matrix -p "$new_user_password"
if [[ $ONION_ONLY == 'no' ]]; then if [[ $ONION_ONLY == 'no' ]]; then
read_config_param MATRIX_DOMAIN_NAME
retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user https://${MATRIX_DOMAIN_NAME}) retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user https://${MATRIX_DOMAIN_NAME})
else else
retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user http://${MATRIX_DOMAIN_NAME}) retval=$(register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml -u "${new_username}" -p "${new_user_password}" $is_admin_user http://${MATRIX_DOMAIN_NAME})