Merge pull request #132 from rozdzynski/master

Unary operator fix
This commit is contained in:
Dave Conroy
2022-06-03 05:09:27 -07:00
committed by GitHub

View File

@@ -446,7 +446,7 @@ cleanup_old_data() {
s3_olderthan=$(echo $(( $(date +%s)-${DB_CLEANUP_TIME}*60 ))) s3_olderthan=$(echo $(( $(date +%s)-${DB_CLEANUP_TIME}*60 )))
if [[ $s3_createdate -le $s3_olderthan ]] ; then if [[ $s3_createdate -le $s3_olderthan ]] ; then
s3_filename=$(echo $s3_file | awk {'print $4'}) s3_filename=$(echo $s3_file | awk {'print $4'})
if [ $s3_filename != "" ] ; then if [ "$s3_filename" != "" ] ; then
print_debug "Deleting $s3_filename" print_debug "Deleting $s3_filename"
silent aws ${PARAM_AWS_ENDPOINT_URL} s3 rm s3://${S3_BUCKET}/${S3_PATH}/${s3_filename} ${s3_ssl} ${s3_ca_cert} ${S3_EXTRA_OPTS} silent aws ${PARAM_AWS_ENDPOINT_URL} s3 rm s3://${S3_BUCKET}/${S3_PATH}/${s3_filename} ${s3_ssl} ${s3_ca_cert} ${S3_EXTRA_OPTS}
fi fi