system/cron/cron.daily/beauties-cleanup.sh
Georg 28cefabe61
Initial Cron Run
Signed-off-by: Georg <georg@lysergic.dev>
2021-07-21 13:33:34 +02:00

7 lines
324 B
Bash

#!/bin/sh
BEFORE=$(du -h /opt/beauties/data/storage)
echo "#universe +++ $BEFORE - Starting cleanup ..." | nc -N 127.0.0.2 2424
find /opt/beauties/data/storage/* -mtime +60 -exec rm {} \; | nc -N 127.0.0.2 2424
AFTER=$(du -h /opt/beauties/data/storage)
echo "#universe +++ $AFTER - Cleanup complete." | nc -N 127.0.0.2 2424