diff options
-rwxr-xr-x | scripts/purge-old-pastes.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/purge-old-pastes.sh b/scripts/purge-old-pastes.sh index a22ded8..3299728 100755 --- a/scripts/purge-old-pastes.sh +++ b/scripts/purge-old-pastes.sh @@ -3,6 +3,7 @@ # This script is intend to be run as a cron job (every day for ex) to purge # old pastes. +cd /pasteme pastedir="$(python3 -c 'import config; print(config.pastedir)')" timeout="$(python3 -c 'import config; print(config.timeout)')" find "$pastedir" -type f -mtime +"$timeout" -exec rm {} \; |