From 93272a5fab5988cc7579e278baacbc3d85f289ba Mon Sep 17 00:00:00 2001 From: shixuantong Date: Wed, 22 Jan 2025 09:42:27 +0800 Subject: [PATCH] move logrotate-sysSentry.conf from /etc/ to /etc/sysSentry/ --- set-logrotate.patch | 2 +- sysSentry.spec | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/set-logrotate.patch b/set-logrotate.patch index ba2634d..087fee2 100644 --- a/set-logrotate.patch +++ b/set-logrotate.patch @@ -39,7 +39,7 @@ index 0000000..64d02f9 + +TMPF=`mktemp /tmp/logrotate-sysSentry.XXXXXXXXX` + -+/usr/sbin/logrotate /etc/logrotate-sysSentry.conf -v --log=$TMPF -s /var/lib/logrotate-syssentry/logrotate.status ++/usr/sbin/logrotate /etc/sysSentry/logrotate-sysSentry.conf -v --log=$TMPF -s /var/lib/logrotate-syssentry/logrotate.status +EXITVALUE=$? +if [ $EXITVALUE != 0 ]; then + /bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE], for details, see /var/log/sysSentry/logrotate.log" diff --git a/sysSentry.spec b/sysSentry.spec index f2d1940..883f713 100644 --- a/sysSentry.spec +++ b/sysSentry.spec @@ -4,7 +4,7 @@ Summary: System Inspection Framework Name: sysSentry Version: 1.0.2 -Release: 26 +Release: 27 License: Mulan PSL v2 Group: System Environment/Daemons Source0: https://gitee.com/openeuler/sysSentry/releases/download/v%{version}/%{name}-%{version}.tar.gz @@ -148,7 +148,7 @@ chrpath -d %{buildroot}%{_libdir}/libcpu_patrol.so # logrotate mkdir -p %{buildroot}%{_localstatedir}/lib/logrotate-syssentry mkdir -p %{buildroot}%{_sysconfdir}/cron.hourly -install -m 0600 config/logrotate-sysSentry.conf %{buildroot}%{_sysconfdir}/logrotate-sysSentry.conf +install -m 0600 config/logrotate-sysSentry.conf %{buildroot}%{_sysconfdir}/sysSentry/logrotate-sysSentry.conf install -m 0500 src/sh/logrotate-sysSentry.cron %{buildroot}%{_sysconfdir}/cron.hourly/logrotate-sysSentry pushd src/python @@ -199,7 +199,7 @@ rm -rf %{buildroot} # logrotate %dir %{_localstatedir}/lib/logrotate-syssentry -%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/logrotate-sysSentry.conf +%attr(0600,root,root) %config(noreplace) %{_sysconfdir}/sysSentry/logrotate-sysSentry.conf %attr(0500,root,root) %{_sysconfdir}/cron.hourly/logrotate-sysSentry # cpu inspection module @@ -238,6 +238,12 @@ rm -rf %{buildroot} %attr(0550,root,root) %{python3_sitelib}/syssentry/bmc_alarm.py %changelog +* Wed Jan 22 2025 shixuantong - 1.0.2-27 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:move logrotate-sysSentry.conf from /etc/ to /etc/sysSentry/ + * Fri Jan 17 2025 caixiaomeng - 1.0.2-26 - Type:bugfix - CVE:NA -- Gitee