main
added instructions for adding a folder for the log output of the cronjob as well as modifying the cronjob
Mastodon Media Maintenance Script
This Script removes cached and federated media.
Requirements:
- Mastodon installed as documented here: https://docs.joinmastodon.org/admin/install/
- Logged in as Mastodon User
- The right home directory /home/mastodon/
Instructions:
- Create a File: nano mastodon.sh
- Give the file the needed permissions: chmod 0755 mastodon.sh
- Create a directory for the logs: mkdir mms-logs
- Adding a log file to the directory: touch mms-logs/script.log
- Run it: bash mastodon.sh
- Done.
What does this script do?
- Deleting media (from federated servers) older than one day
- Deleting cached files
- Deleting files that do not belong to existing media attachments
Create a cronjob that runs every 30 mins:
- crontab -e
- Copy & Paste: */30 * * * * bash /home/mastodon/mastodon.sh > /home/mastodon/mms-logs/script.log 2>&1
Description
This Script removes cached and federated media.
43 KiB
0 Stars
1 Watchers
0 Forks
Languages
Shell
100%