From a024eedb1c0a537aa236fa27fe7a94ba6aa3d76c Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Thu, 24 Sep 2020 13:50:06 +0200 Subject: 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". --- gnu/services/cuirass.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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." -- cgit v1.2.3