|
@@ -124,7 +124,11 @@ function add_user_matrix {
|
124
|
124
|
|
125
|
125
|
cd /etc/matrix/scripts
|
126
|
126
|
register_new_matrix_user -c ${MATRIX_DATA_DIR}/homeserver.yaml https://localhost:${MATRIX_PORT} -u "${new_username}" -p "${new_user_password}" -a
|
127
|
|
- echo '0'
|
|
127
|
+ if [ ! "$?" = "0" ]; then
|
|
128
|
+ echo '1'
|
|
129
|
+ else
|
|
130
|
+ echo "0"
|
|
131
|
+ fi
|
128
|
132
|
}
|
129
|
133
|
|
130
|
134
|
function install_interactive_matrix {
|
|
@@ -355,6 +359,10 @@ function install_matrix {
|
355
|
359
|
fi
|
356
|
360
|
fi
|
357
|
361
|
|
358
|
|
- add_user_matrix "${MY_USERNAME}" "${MATRIX_PASSWORD}"
|
|
362
|
+ if [[ $(add_user_matrix "${MY_USERNAME}" "${MATRIX_PASSWORD}") != "0" ]]; then
|
|
363
|
+ echo $'Failed to add matrix admin user';
|
|
364
|
+ exit 879352
|
|
365
|
+ fi
|
|
366
|
+
|
359
|
367
|
APP_INSTALLED=1
|
360
|
368
|
}
|