Update readme.md

added instructions for adding a folder for the log output of the cronjob as well as modifying the cronjob
This commit is contained in:
daniel committed 2026-10-15 05:13:52 +00:00
1 parent c835954f5d
commit 12d654382b
1 file changed
+5 -3
+5 -3
View File
@@ -9,6 +9,8 @@ This Script removes cached and federated media.
# Instructions: # Instructions:
- Create a File: nano mastodon.sh - Create a File: nano mastodon.sh
- Give the file the needed permissions: chmod 0755 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 - Run it: bash mastodon.sh
- Done. - Done.
@@ -19,6 +21,6 @@ This Script removes cached and federated media.
- Deleting cached files - Deleting cached files
- Deleting files that do not belong to existing media attachments - Deleting files that do not belong to existing media attachments
# Create hourly cronjob: # Create a cronjob that runs every 30 mins:
- sudo crontab -u mastodon -e - crontab -e
- Copy & Paste: 0 * * * * bash /home/mastodon/mastodon.sh - Copy & Paste: */30 * * * * bash /home/mastodon/mastodon.sh > /home/mastodon/mms-logs/script.log 2>&1