summaryrefslogtreecommitdiff
path: root/gnu/services/cuirass.scm
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2020-09-24 13:50:06 +0200
committerMathieu Othacehe <othacehe@gnu.org>2020-09-24 13:51:57 +0200
commita024eedb1c0a537aa236fa27fe7a94ba6aa3d76c (patch)
tree2372eac93dc202019f4354ed12e6cff949fd06aa /gnu/services/cuirass.scm
parent80e26d74294d40f311f61d13996f1ed1aa4d8edd (diff)
services: cuirass: Create queries log files at activation.
* gnu/services/cuirass.scm (cuirass-activation)[queries-log-file]: Create and set user permissions on "queries-log-file" and "web-queries-log-file".
Diffstat (limited to 'gnu/services/cuirass.scm')
-rw-r--r--gnu/services/cuirass.scm11
1 files changed, 10 insertions, 1 deletions
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index adf79af8ac..d4faf7823b 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -186,6 +186,9 @@
(db (dirname (cuirass-configuration-database config)))
(user (cuirass-configuration-user config))
(log "/var/log/cuirass")
+ (queries-log-file (cuirass-configuration-queries-log-file config))
+ (web-queries-log-file
+ (cuirass-configuration-web-queries-log-file config))
(group (cuirass-configuration-group config)))
(with-imported-modules '((guix build utils))
#~(begin
@@ -199,7 +202,13 @@
(gid (group:gid (getgr #$group))))
(chown #$cache uid gid)
(chown #$db uid gid)
- (chown #$log 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))))))
(define (cuirass-log-rotations config)
"Return the list of log rotations that corresponds to CONFIG."