From 55b62b1b954abf185fe4e85957a2eb7defc28e0c Mon Sep 17 00:00:00 2001 From: Daniel <2+daniel@noreply.localhost> Date: Wed, 14 Oct 2026 05:00:18 +0000 Subject: [PATCH] Add readme.md --- readme.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 readme.md diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..11408b8 --- /dev/null +++ b/readme.md @@ -0,0 +1,24 @@ +# 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 +- 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 hourly cronjob: +- sudo crontab -u mastodon -e +- Copy & Paste: 0 * * * * bash /home/mastodon/mastodon.sh \ No newline at end of file