Check that user is added

This commit is contained in:
Bob Mottram 2016-12-30 16:59:03 +00:00
parent 42b4317c65
commit 4660718b9c
1 changed files with 10 additions and 2 deletions

View File

@ -124,7 +124,11 @@ function add_user_matrix {
cd /etc/matrix/scripts
register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml https://localhost:${MATRIX_PORT} -u "${new_username}" -p "${new_user_password}" -a
echo '0'
if [ ! "$?" = "0" ]; then
echo '1'
else
echo "0"
fi
}
function install_interactive_matrix {
@ -355,6 +359,10 @@ function install_matrix {
fi
fi
add_user_matrix "${MY_USERNAME}" "${MATRIX_PASSWORD}"
if [[ $(add_user_matrix "${MY_USERNAME}" "${MATRIX_PASSWORD}") != "0" ]]; then
echo $'Failed to add matrix admin user';
exit 879352
fi
APP_INSTALLED=1
}