diff options
Diffstat (limited to 'cron/clean_database.pl')
-rwxr-xr-x | cron/clean_database.pl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cron/clean_database.pl b/cron/clean_database.pl new file mode 100755 index 0000000..f553515 --- /dev/null +++ b/cron/clean_database.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl +use strict; +use Cwd 'abs_path'; +use File::Basename; +use local::db; +use config; + +for my $dl (local::db::download->retrieve_all) +{ + $dl->delete if not -d $config::config{files_dir}.'/'.$dl->category->name.'/'.$dl->download_id; +} |