saving uncommitted changes in /etc prior to dnf run

This commit is contained in:
2023-02-09 14:51:39 +02:00
parent f150a7c81b
commit 4911d0453d
112 changed files with 4799 additions and 6 deletions

7
cron.daily/ossec_logs_cleaner Executable file
View File

@@ -0,0 +1,7 @@
#!/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