From ecbc9b36f4c43f38c511fdf2775e8681f22dc770 Mon Sep 17 00:00:00 2001 From: patvdv Date: Sat, 10 Nov 2018 21:38:42 +0100 Subject: [PATCH] Added logrotate configuration file --- build/linux/SPECS/hc-linux.spec | 12 ++++++++---- configs/logrotate.d/check_health | 5 +++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 configs/logrotate.d/check_health diff --git a/build/linux/SPECS/hc-linux.spec b/build/linux/SPECS/hc-linux.spec index d14f2ec..71ffd0e 100644 --- a/build/linux/SPECS/hc-linux.spec +++ b/build/linux/SPECS/hc-linux.spec @@ -10,11 +10,11 @@ Group: Tools/Monitoring License: GNU General Public License either version 2 of the License, or (at your option) any later version URL: http://www.kudos.be -Requires: ksh +Requires: ksh,logrotate BuildArch: noarch BuildRoot: %{_topdir}/%{name}-%{version}-root - -%description + +%description The Health Checker is collection of scripts (plugins) designed to perform regular - but not intensive - health checks on UNIX/Linux systems. It provides plugins for AIX, HP-UX and Linux as well customer specific checks. Checks may include topics such file system mounts, process checks, file consistency etc. %prep @@ -44,6 +44,7 @@ cp ../SOURCES/etc/core/templates/mail_header.tpl $RPM_BUILD_ROOT/etc/opt/hc/core cp ../SOURCES/etc/core/templates/mail_body.tpl $RPM_BUILD_ROOT/etc/opt/hc/core/templates cp ../SOURCES/etc/core/templates/mail_footer.tpl $RPM_BUILD_ROOT/etc/opt/hc/core/templates install -d -m 755 $RPM_BUILD_ROOT/var/opt/hc +cp ../SOURCES/etc/logrotate.d/check_health $RPM_BUILD_ROOT/etc/logrotate.d/check_health %post # ------------------------- CONFIGURATION starts here ------------------------- @@ -130,7 +131,7 @@ then else echo "INFO: skipping post-uninstall script (RPM upgrade)" fi - + %files %defattr(-,root,root,755) %dir /opt/hc @@ -154,8 +155,11 @@ fi %attr(644, root, root) /etc/opt/hc/core/templates/mail_body.tpl %attr(644, root, root) /etc/opt/hc/core/templates/mail_footer.tpl %dir /var/opt/hc +%attr(644, root, root) /etc/logrotate.d/check_health %changelog +* Sat Nov 10 2018 - 0.1.0 +- Added logrotate file * Mon Dec 18 2017 - 0.0.9 - Added report_std.sh * Tue Jun 20 2017 - 0.0.8 diff --git a/configs/logrotate.d/check_health b/configs/logrotate.d/check_health new file mode 100644 index 0000000..d1f5bfd --- /dev/null +++ b/configs/logrotate.d/check_health @@ -0,0 +1,5 @@ +/var/opt/hc/check_health.sh.log { + monthly + notifempty + create 644 root root +}