Created
July 20, 2022 19:29
-
-
Save tyrm/053e48bf89f7f5608ee6c7124ca0f204 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONTAINER_NAME=$1 | |
LOG_FILE=/var/log/mastodon/$CONTAINER_NAME.log | |
echo >> $LOG_FILE 2>&1 | |
date >> $LOG_FILE 2>&1 | |
echo "statuses remove" >> $LOG_FILE 2>&1 | |
docker exec $CONTAINER_NAME bin/tootctl statuses remove >> $LOG_FILE 2>&1 | |
echo >> $LOG_FILE 2>&1 | |
date >> $LOG_FILE 2>&1 | |
echo "accounts refresh" >> $LOG_FILE 2>&1 | |
docker exec $CONTAINER_NAME bin/tootctl accounts refresh --all >> $LOG_FILE 2>&1 | |
echo >> $LOG_FILE 2>&1 | |
date >> $LOG_FILE 2>&1 | |
echo "media remove" >> $LOG_FILE 2>&1 | |
docker exec $CONTAINER_NAME bin/tootctl media remove >> $LOG_FILE 2>&1 | |
echo >> $LOG_FILE 2>&1 | |
date >> $LOG_FILE 2>&1 | |
echo "preview_cards remove" >> $LOG_FILE 2>&1 | |
docker exec $CONTAINER_NAME bin/tootctl preview_cards remove >> $LOG_FILE 2>&1 | |
echo >> $LOG_FILE 2>&1 | |
date >> $LOG_FILE 2>&1 | |
echo "done." >> $LOG_FILE 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment