add delete scripts for peertube, modoboa, nextcloud

This commit is contained in:
root 2022-11-09 12:29:04 -05:00
parent 57465f3082
commit ae2579d68a
1 changed files with 6 additions and 0 deletions

View File

@ -17,6 +17,12 @@ read -rp "Delete user $1? [y/N] "
curl -XPOST -H "Authorization: Bearer $(</root/priv/root-access-token)" -H "Content-Type: application/json" -d '{"erase":true}' "http://localhost:8008/_synapse/admin/v1/deactivate/@$1:vern.cc"
su - mastodon -c "live/bin/tootctl accounts delete $1"
su - git -c "gitea admin user delete --username $1 -c /etc/gitea/app.ini"
sudo -u www-data php /var/www/nextcloud/occ user:delete "$1"
curl -s -X DELETE -H 'Content-Type: application/json' -H 'Authorization: Token '"$(</root/priv/modoboapitoken)"\
-d '{ id: "'"${1}"'" }'\
'https://mail.vern.cc/api/v2/accounts/'"${1}"
curl -s -X DELETE -H 'Content-Type: application/json' -H 'Authorization: Bearer '"$(peertube-authcode-gen)"\
'https://pt.vern.cc/api/v1/users/'"${1}"
prosodyctl deluser "$1"@vern.cc
prosodyctl deluser "$1"@jitsi.vern.cc
prosodyctl deluser "$1"@vernccvbvyi5qhfzyqengccj7lkove6bjot2xhh5kajhwvidqafczrad.onion