Commit 6a8f3fa0 authored by Milan's avatar Milan
Browse files

Add new file nukerooms.sh

parent 423116d8
#!/bin/bash
set -e
# your admin token... could be handier to export it in your shell. secure this file for example with 'chmod 600'
#token = 123455678
# read the previously created list of rooms to delete
readarray -t rooms < nukerooms.txt
for i in "${rooms[@]}"
do
printf "`date +'%T'`: deleting room ${i} ...\n"
curl -X POST http://localhost:8008/_synapse/admin/v1/rooms/${i}/delete \
-H "Authorization: Bearer $token" \
-XPOST -d '{"purge": true}'
printf "\n\n"
done
echo "Done!"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment