move logrotate-sysSentry.conf from /etc/ to /etc/sysSentry/

This commit is contained in:
shixuantong 2025-01-22 09:42:27 +08:00
parent 6aca33cf00
commit 93272a5fab
2 changed files with 10 additions and 4 deletions

View File

@ -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"

View File

@ -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 <shixuantong@huawei.com> - 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 <caixiaomeng2@huawei.com> - 1.0.2-26
- Type:bugfix
- CVE:NA