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

Separate matrix user removal script generation

parent ace9d9c5
No related branches found
No related tags found
No related merge requests found
...@@ -329,11 +329,7 @@ function matrix_generate { ...@@ -329,11 +329,7 @@ function matrix_generate {
matrix_configure_homeserver_yaml "${turnkey}" $homeserver_config matrix_configure_homeserver_yaml "${turnkey}" $homeserver_config
} }
function remove_user_matrix { function create_matrix_user_removal_script {
remove_username="$1"
${PROJECT_NAME}-pass -u $remove_username --rmapp matrix
read_config_param MY_USERNAME read_config_param MY_USERNAME
read_config_param MATRIX_DOMAIN_NAME read_config_param MATRIX_DOMAIN_NAME
...@@ -349,7 +345,13 @@ function remove_user_matrix { ...@@ -349,7 +345,13 @@ function remove_user_matrix {
echo "curl -X POST 'https://$MATRIX_DOMAIN_NAME/_matrix/client/r0/admin/deactivate/%40\$remove_username%3A$MATRIX_DOMAIN_NAME?access_token=\$TOKEN' --data '{}'" >> $matrix_remove_user echo "curl -X POST 'https://$MATRIX_DOMAIN_NAME/_matrix/client/r0/admin/deactivate/%40\$remove_username%3A$MATRIX_DOMAIN_NAME?access_token=\$TOKEN' --data '{}'" >> $matrix_remove_user
chmod +x $matrix_remove_user chmod +x $matrix_remove_user
}
function remove_user_matrix {
remove_username="$1"
create_matrix_user_removal_script
${PROJECT_NAME}-pass -u $remove_username --rmapp matrix
$matrix_remove_user "$remove_username" $matrix_remove_user "$remove_username"
} }
...@@ -796,6 +798,7 @@ function install_matrix { ...@@ -796,6 +798,7 @@ function install_matrix {
echo $'Failed to add matrix admin user'; echo $'Failed to add matrix admin user';
exit 879352 exit 879352
fi fi
create_matrix_user_removal_script
set_completion_param "matrix domain" "$MATRIX_DOMAIN_NAME" set_completion_param "matrix domain" "$MATRIX_DOMAIN_NAME"
......
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