From 12b5ecee91074e3270baa402eea7178d2548d2d6 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 6 Jun 2024 18:31:36 +0100 Subject: [PATCH] feat(logrotate): add logrorate.d confx files --- install.sh | 1 + logrotate.d/.gitignore | 1 + logrotate.d/homebrew.confx | 9 +++++++++ logrotate.d/projects.confx | 9 +++++++++ 4 files changed, 20 insertions(+) create mode 100644 logrotate.d/.gitignore create mode 100644 logrotate.d/homebrew.confx create mode 100644 logrotate.d/projects.confx diff --git a/install.sh b/install.sh index c1c0080..4694c11 100755 --- a/install.sh +++ b/install.sh @@ -31,6 +31,7 @@ SYMLINKS=( hgrc hyper.js irbrc + logrotate.d peco powconfig pryrc diff --git a/logrotate.d/.gitignore b/logrotate.d/.gitignore new file mode 100644 index 0000000..fee9217 --- /dev/null +++ b/logrotate.d/.gitignore @@ -0,0 +1 @@ +*.conf diff --git a/logrotate.d/homebrew.confx b/logrotate.d/homebrew.confx new file mode 100644 index 0000000..f43cb34 --- /dev/null +++ b/logrotate.d/homebrew.confx @@ -0,0 +1,9 @@ +$(find "$(brew --prefix)/var/log" -name '*.log' -exec echo '"{}"' \;) { + daily + size 5115k + missingok + rotate 7 + compress + copytruncate + notifempty +} diff --git a/logrotate.d/projects.confx b/logrotate.d/projects.confx new file mode 100644 index 0000000..2906350 --- /dev/null +++ b/logrotate.d/projects.confx @@ -0,0 +1,9 @@ +$(find ~/Projects -name '*.log' -path '*/log/*' ! -path '*/vendor/bundle/ruby/*' ! -path '*/node_modules/*' -exec echo '"{}"' \;) { + daily + size 5115k + missingok + rotate 7 + compress + copytruncate + notifempty +}