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

quotes

parent ae70d9a3
No related branches found
No related tags found
No related merge requests found
......@@ -414,12 +414,15 @@ function create_matrix_user_removal_script {
{ echo '#!/bin/bash';
echo "cd $MATRIX_DATA_DIR || exit 1";
echo "remove_username=\$1";
echo "if [ ! \"\$remove_username\" ]; then"
echo ' exit 1';
echo 'fi';
echo "ADMIN=\"@${MY_USERNAME}:$MATRIX_DOMAIN_NAME\"";
echo 'BUSY="pragma busy_timeout=20000"';
echo "BUFFER=\$(sqlite3 homeserver.db \"\$BUSY;select token from access_tokens where user_id like '\$ADMIN' order by id desc limit 1;\")";
echo "TOKEN=\$(echo \$BUFFER|awk '{print \$2}')";
echo 'set -x';
echo "${curl_command} -X POST '${homebase}/_matrix/client/r0/admin/deactivate/%40\$remove_username%3A$MATRIX_DOMAIN_NAME?access_token=\$TOKEN' --data '{}'"; } > $matrix_remove_user
echo "${curl_command} -X POST \"${homebase}/_matrix/client/r0/admin/deactivate/%40\$remove_username%3A$MATRIX_DOMAIN_NAME?access_token=\$TOKEN\" --data '{}'"; } > $matrix_remove_user
chmod +x $matrix_remove_user
}
......
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