Created
November 24, 2022 13:22
Matodon cleanup scripts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /home/mastodon/live | |
bin/tootctl media remove --days=7 | |
bin/tootctl preview-cards remove --days=7 | |
bin/tootctl statuses remove --days=3 | |
bin/tootctl media remove-orphans |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL=/bin/bash | |
PATH=/home/mastodon/.rbenv/shims:/home/mastodon/.rbenv/bin:/usr/local/bin:/usr/bin:/bin | |
### | |
### Mastodon cronjobs for media cache purging | |
### | |
RAILS_ENV=production | |
0 0 * * * /home/mastodon/scripts/cleanup.sh >> /home/mastodon/logs/cleanup-`date +\%F`.log 2>&1 | |
0 0 * * * /home/mastodon/scripts/logs.sh >> /home/mastodon/logs/logs-`date +\%F`.log 2>&1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
find /home/mastodon/logs -type f -mtime +7 -delete |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
equivalent cron job for my k8s setup:
Notea: