unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tomas Volf <~@wolfsden.cz>
To: 71949@debbugs.gnu.org
Cc: Tomas Volf <~@wolfsden.cz>
Subject: [bug#71949] [PATCH] services: web: Pass run-directory to nginx's actions.
Date: Fri,  5 Jul 2024 17:01:20 +0200	[thread overview]
Message-ID: <063981d97d79af7abec66592d40c6beff9adea46.1720191680.git.~@wolfsden.cz> (raw)

Reloading nginx lead to (harmless, yet annoying) alert being logged:

    nginx: [alert] could not open error log file: open() "/gnu/store/9l2lznlqpjcm79znq1xas378maqgysc8-nginx-1.27.0/logs/error.log" failed (2: No such file or directory)

Since there already is prepared runtime directory for nginx, all that was
missing was to also pass it to the reload and reopen invocations.

* gnu/services/web.scm (nginx-shepherd-service)[reload, reopen]: Pass -p flag
with run-directory as value.

Change-Id: Id5c558d65def8c1fe5cf581a4a370508ac05e550
---
 gnu/services/web.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/services/web.scm b/gnu/services/web.scm
index c10bd4cdff..b73cd30fe7 100644
--- a/gnu/services/web.scm
+++ b/gnu/services/web.scm
@@ -858,11 +858,11 @@ (define (nginx-shepherd-service config)
 the same configuration file.  It is useful for situations where the same nginx
 configuration file can point to different things after a reload, such as
 renewed TLS certificates, or @code{include}d files.")
-                 (procedure (nginx-action "-s" "reload")))
+                 (procedure (nginx-action "-p" run-directory "-s" "reload")))
                (shepherd-action
                 (name 'reopen)
                 (documentation "Re-open log files.")
-                (procedure (nginx-action "-s" "reopen"))))))))))
+                (procedure (nginx-action "-p" run-directory "-s" "reopen"))))))))))
 
 (define nginx-service-type
   (service-type (name 'nginx)
-- 
2.45.1





             reply	other threads:[~2024-07-05 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05 15:01 Tomas Volf [this message]
2024-07-10 14:05 ` bug#71949: [PATCH] services: web: Pass run-directory to nginx's actions Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='063981d97d79af7abec66592d40c6beff9adea46.1720191680.git.~@wolfsden.cz' \
    --to=~@wolfsden.cz \
    --cc=71949@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).