Add a script for trimming storage

This commit is contained in:
Waffles
2023-01-03 16:31:04 -08:00
parent 2e4b281663
commit 800fa074bb
3 changed files with 16 additions and 0 deletions
@@ -0,0 +1,9 @@
#!/bin/bash
DAYS=5
DOCKER_IMAGE=live-web-1
LOGFILE=/tmp/media_remove.log
REMOVED=$(/usr/bin/docker exec -i $DOCKER_IMAGE /opt/mastodon/bin/tootctl media remove --days $DAYS 2>&1 | egrep -e '^Removed')
echo "$(date +%I): $REMOVED" >> $LOGFILE