1
mirror of https://github.com/jakejarvis/mastodon-utils.git synced 2025-04-26 02:15:22 -04:00
mastodon-utils/scripts/weekly_cleanup.sh
2022-12-15 13:45:37 -05:00

13 lines
331 B
Bash
Executable File

#!/bin/sh
# cronjob ran once per week at 3 AM on Sunday; see https://crontab.guru/#0_3_*_*_0
# syntax for crontab -e:
# 0 3 * * 0 root /home/mastodon/utils/weekly_cleanup.sh >> /home/mastodon/logs/cron.log 2>&1
set -e
. "$(dirname "$0")/tootctl_shim.sh"
tootctl media remove --days 7
tootctl preview_cards remove --days 90