securityonion icon indicating copy to clipboard operation
securityonion copied to clipboard

FIX: Many scripts run by cron overwrite their logfile

Open petiepooo opened this issue 2 months ago • 1 comments

Many scripts run by cron, such as so-rule-update and so-elasticsearch-indices-delete, overwrite their logfile on each run, so a history of what the script has done is lost. Changing the redirect from '>' to '>>' means historical runs will remain in the logfile. Furthermore, the bash-ism '&>>' redirects for stdout and stderr, eliminating the need for the separate '2>&1'.

See #12943 for proposed fix.

Note: this does not address retention and rotation of these logfiles. With them growing in size after this patch, they could get large quickly if not rotated regularly.

petiepooo avatar May 06 '24 15:05 petiepooo