Embed Notice
HTML Code
Corresponding Notice
- Embed this notice
God's Silliest Soldier (frailleaf@silliness.observer)'s status on Sunday, 21-May-2023 05:48:13 JSTGod's Silliest Soldier @meso @LovecraftEnthusiast @MercurialBlack @MischievousTomato @Paulo @Ruusu @get @histoire @koropokkur @paulo @stickyfingers @theorytoe fucking uh shell script time
```
#!/bin/bash
TOKEN="pernia"
instances="('bae.st')";
psql -U frailleaf akkoma -tAc "SELECT nickname from users where (CURRENT_TIMESTAMP-inserted_at) < '24 hours'::interval and split_part(\"ap_id\", '/', 3) in $instances;" > usernames.txt
echo "detecting $(wc -l usernames.txt) new accounts in $instances"
echo '{"nicknames": [' "$(sed 's/.*/"&"/' usernames.txt | tr '\n' ',' | sed 's/,$//')" ']}' | jq . > usernames.json
curl -H "Authorization: Bearer ${TOKEN}" -H 'Content-Type: application/json' -H 'Accept: application/json' --data-binary "@/home/frailleaf/bin/usernames.json" -X PATCH https://silliness.observer/api/v1/pleroma/admin/users/deactivate
```