aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-10-02 14:58:01 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-10-02 14:58:01 +0200
commitd6a8f0a9781a90c3037f25e51d7ff32e50f7a8c1 (patch)
treee324e4eb488534971d0c9fdae39b7067cfa8e2be /gnu
parent23ad7e92b1464e6e951603e79d3edbaffd5a5fa0 (diff)
downloadguix-d6a8f0a9781a90c3037f25e51d7ff32e50f7a8c1.tar.gz
guix-d6a8f0a9781a90c3037f25e51d7ff32e50f7a8c1.zip
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.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/cuirass.scm14
1 files changed, 9 insertions, 5 deletions
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index d4faf7823b..a50f583807 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."