aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/purge-old-pastes.sh
blob: a22ded88434c809b4d0774d378c25228ea2987f6 (plain)
1
2
3
4
5
6
7
8
#!/bin/sh

# This script is intend to be run as a cron job (every day for ex) to purge
# old pastes.

pastedir="$(python3 -c 'import config; print(config.pastedir)')"
timeout="$(python3 -c 'import config; print(config.timeout)')"
find "$pastedir" -type f -mtime +"$timeout" -exec rm {} \;