HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux mail.btech-izolacje.pl 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
User: pewna6876 (1017)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: //etc/cron.daily/imunify360-ossec-server
#!/bin/bash
# -delete option implicitly uses -depth, which traverse folders with DFS 
# (beginning with folder's content, ending with folder itself)
# so, if old folder contains old files, "directory is not empty" error won't happen.
# Old folder may not be deleted only if contains recently modified files
find -H /var/ossec/logs/{alerts/*,archives/*,firewall/*} -mtime +2 -not -name alerts.json -delete >/dev/null 2>&1
exit 0