Files
masto-ansible/roles/mastodon/files/trim_storage.sh
T
2023-01-20 08:06:34 -08:00

10 lines
241 B
Bash

#!/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): $REMOVED" >> $LOGFILE