X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/641204dfbdb9fc870cdd2e7f9e3169a44693e7bf..da585bb94c437f06762a2042ef4c52166b8aafce:/projects/stargazer/scripts/clean_db?ds=inline 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