services: cuirass: Create /var/log/cuirass during activation.

* gnu/services/cuirass.scm (cuirass-activation): Create "/var/log/cuirass".
This commit is contained in:
Ludovic Courtès 2019-10-23 21:48:08 +02:00
parent 134a2c4ad8
commit b40f4a5995
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -164,6 +164,7 @@ (define (cuirass-activation config)
(let ((cache (cuirass-configuration-cache-directory config))
(db (dirname (cuirass-configuration-database config)))
(user (cuirass-configuration-user config))
(log "/var/log/cuirass")
(group (cuirass-configuration-group config)))
(with-imported-modules '((guix build utils))
#~(begin
@ -171,11 +172,13 @@ (define (cuirass-activation config)
(mkdir-p #$cache)
(mkdir-p #$db)
(mkdir-p #$log)
(let ((uid (passwd:uid (getpw #$user)))
(gid (group:gid (getgr #$group))))
(chown #$cache uid gid)
(chown #$db uid gid))))))
(chown #$db uid gid)
(chown #$log uid gid))))))
(define (cuirass-log-rotations config)
"Return the list of log rotations that corresponds to CONFIG."