Use systemctl reload in logrotate script

In 5f74814 (Use systemctl for sending SIGHUP to the service,
2015-06-29), a direct call to `kill` was replaced with `systemctl kill`.

This can be simplified using `systemctl reload` instead.  Doing so also
resolves an issue when `POSIXLY_CORRECT` is set (rhbz#2124488).
This commit is contained in:
Todd Zullinger 2023-05-10 21:34:17 -04:00
parent cee335df7d
commit 00eb7785d3
2 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,6 @@
missingok
sharedscripts
postrotate
/usr/bin/systemctl kill -s HUP rsyslog.service >/dev/null 2>&1 || true
/usr/bin/systemctl reload rsyslog.service >/dev/null 2>&1 || true
endscript
}

View File

@ -35,7 +35,7 @@
Summary: Enhanced system logging and kernel message trapping daemon
Name: rsyslog
Version: 8.2210.0
Release: 4%{?dist}
Release: 5%{?dist}
License: (GPLv3+ and ASL 2.0)
URL: http://www.rsyslog.com/
Source0: http://www.rsyslog.com/files/download/rsyslog/%{name}-%{version}.tar.gz
@ -757,6 +757,9 @@ done
%changelog
* Wed May 10 2023 Todd Zullinger <tmz@pobox.com> - 8.2210.0-5
- Use 'systemctl reload' in logrotate script
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 8.2210.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild