From ba0715088dcb353914a4e18cedd64e9e55c6062b98e65c9072e4543b6d6c2c87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=98=D0=BD=D0=B4=D0=B8=D0=B3?= =?UTF-8?q?=D0=BE?= Date: Sun, 3 Mar 2024 11:04:33 +0000 Subject: [PATCH] Accepting request 1154405 from home:etamPL:branches:server:http logrotate: don't fail if service not running OBS-URL: https://build.opensuse.org/request/show/1154405 OBS-URL: https://build.opensuse.org/package/show/server:http/nginx?expand=0&rev=254 --- nginx.changes | 5 +++++ nginx.logrotate | 7 +++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/nginx.changes b/nginx.changes index 239c0c5..69b1088 100644 --- a/nginx.changes +++ b/nginx.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sun Mar 3 10:24:27 UTC 2024 - Adam Mizerski + +- logrotate: don't fail if service not running + ------------------------------------------------------------------- Thu Feb 22 14:08:07 UTC 2024 - Dominique Leuenberger diff --git a/nginx.logrotate b/nginx.logrotate index 5ca17a5..6d64cb6 100644 --- a/nginx.logrotate +++ b/nginx.logrotate @@ -8,8 +8,7 @@ notifempty delaycompress lastaction - # -s reopen will use the pid file passed in the config file or the compiled in default path - /usr/sbin/nginx -s reopen - endscript + # "-s reopen" will use the pid file passed in the config file or the compiled in default path + [ -f /run/nginx.pid ] && /usr/sbin/nginx -s reopen + endscript } -