reflect recent changes in options

This commit is contained in:
ij 2023-11-18 20:24:12 +00:00
parent c3bd7d2d5f
commit c31c0ab0e5
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ The script does two things:
# Installation
* save the script in home directory of Mastodon (eg. ~/bin, not under /root, maybe /usr/local/bin)
* make the script executable (e.g. `chown mastodon:mastodon bin/cleanup-mastodon-users.sh && chmod u+rx bin/cleanup-mastodon-users.sh)`
* create a config file at `$HOME/.cleanup-mastodon-users.conf` by calling the script with `--init` argument and edit the file to fit your needs
* create a crontab to execute the script, e.g.: `20 8 * * 4 /home/mastodon/bin/cleanup-mastodon-users.sh --dowhatimean` to execute the script every week. In the example it is executed every Thursday (4th day of week) at 8:20 in the morning.
* for the first runs you should set `UPPERLIMIT` to a high number and keep the deleting of the user commented out (`${mastodonpath}/bin/tootctl accounts delete "${username}"`). After the first few runs you can reduce `UPPERLIMIT` to a lower setting and repeat this until you reached the final value. You shouldn't have too many weeks between `LOWERLIMIT` and `UPPERLIMIT`. Sensible values might be 6 and 7 months or 12 and 13 months or so.
* change the variables at the begin of the script to your site settings.
@ -15,6 +16,7 @@ The script does two things:
# Usage
```
Usage:
--init : create bin/cleanup-mastodon-users.sh/.cleanup-mastodon-users.conf config file.
--dry-run : make a dry-run, no deletion will be done, no mails are sent.
--cron : delete deactivated users in a regularly cron run step by step to avoid mass flooding.
--dowhatimean : add this option if you really want to delete users.