guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: services: cuirass: Fix activation.


From: guix-commits
Subject: branch master updated: services: cuirass: Fix activation.
Date: Fri, 02 Oct 2020 09:00:15 -0400

This is an automated email from the git hooks/post-receive script.

mothacehe pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new d6a8f0a  services: cuirass: Fix activation.
d6a8f0a is described below

commit d6a8f0a9781a90c3037f25e51d7ff32e50f7a8c1
Author: Mathieu Othacehe <othacehe@gnu.org>
AuthorDate: Fri Oct 2 14:58:01 2020 +0200

    services: cuirass: Fix activation.
    
    Fixes: <https://issues.guix.gnu.org/43760>.
    
    * gnu/services/cuirass.scm (cuirass-activation): Do not create
    queries-log-file and web-queries-log-file if the corresponding config file 
are
    unset.
---
 gnu/services/cuirass.scm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index d4faf78..a50f583 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -204,11 +204,15 @@
             (chown #$db uid gid)
             (chown #$log uid gid)
 
-            (call-with-output-file #$queries-log-file (const #t))
-            (call-with-output-file #$web-queries-log-file (const #t))
-
-            (chown #$queries-log-file uid gid)
-            (chown #$web-queries-log-file uid gid))))))
+            (let ((queries-log-file #$queries-log-file))
+              (when queries-log-file
+                (call-with-output-file queries-log-file (const #t))
+                (chown #$queries-log-file uid gid)))
+
+            (let ((web-queries-log-file #$web-queries-log-file))
+              (when web-queries-log-file
+                (call-with-output-file web-queries-log-file (const #t))
+                (chown web-queries-log-file uid gid))))))))
 
 (define (cuirass-log-rotations config)
   "Return the list of log rotations that corresponds to CONFIG."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]