This is the second revision of the logrotate script for NGINX. This changes the log files' names from /var/log/nginx/*_log to /var/log/nginx/*.log, resembling the new nginx.eclass defaults (bug 700866).
The postrotate script was updated to use the "$()" construct for the command substitution, instead of the legacy `backtick` one. The "kill" utility now use a more POSIX-complying argument "-s singal_name", replacing the XSI's "-signal_name". Bug: https://bugs.gentoo.org/700866 Signed-off-by: Zurab Kvachadze <zurabid2...@gmail.com> --- www-servers/nginx/files/nginx-r2.logrotate | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 www-servers/nginx/files/nginx-r2.logrotate diff --git a/www-servers/nginx/files/nginx-r2.logrotate b/www-servers/nginx/files/nginx-r2.logrotate new file mode 100644 index 000000000000..1f16c41261cb --- /dev/null +++ b/www-servers/nginx/files/nginx-r2.logrotate @@ -0,0 +1,11 @@ +# Copyright 1999-2025 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +/var/log/nginx/*.log { + missingok + delaycompress + sharedscripts + postrotate + test -r /run/nginx.pid && kill -s USR1 "$(cat /run/nginx.pid)" + endscript +} -- 2.45.3