mastodon: add clear-cache command

This commit is contained in:
lassulus 2023-08-26 08:24:47 +02:00
parent 4acff6e9e9
commit 36eaa0d88d

View File

@ -33,8 +33,10 @@
];
environment.systemPackages = [
(pkgs.writers.writeDashBin "tootctl" ''
sudo -u mastodon /etc/profiles/per-user/mastodon/bin/mastodon-env /etc/profiles/per-user/mastodon/bin/tootctl "$@"
(pkgs.writers.writeDashBin "clear-mastodon-cache" ''
mastodon-tootctl media remove --prune-profiles --days=14 --concurrency=30
mastodon-tootctl media remove-orphans
mastodon-tootctl preview_cards remove --days=14
'')
(pkgs.writers.writeDashBin "create-mastodon-user" ''
set -efu