X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..64467fb06c680a7ff9bd863333fb0686a10e50be:/projects/stargazer/scripts/clean_db diff --git a/projects/stargazer/scripts/clean_db b/projects/stargazer/scripts/clean_db index 31a85a97..81f6011d 100755 --- a/projects/stargazer/scripts/clean_db +++ b/projects/stargazer/scripts/clean_db @@ -26,12 +26,12 @@ do for ys in $usr/detail_stat/* do year=`basename $ys` - + for ms in $ys/* do month=`basename $ms` - stat_time=`date --date="$year/$month/01" +%s` - + stat_time=`date --date="$year/$month/01" +%s` + if (( $NOW - $stat_time > $DT )) then rm -fr $ms