services: cuirass: Create the database directory.

* gnu/services/cuirass.scm (cuirass-activation): Create the database
directory for CONFIG.
This commit is contained in:
Ludovic Courtès 2016-12-20 09:56:55 +01:00
parent 8c4e99cca3
commit 137f8df66c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 4 additions and 1 deletions

View File

@ -114,6 +114,7 @@
(define (cuirass-activation config)
"Return the activation code for CONFIG."
(let ((cache (cuirass-configuration-cache-directory config))
(db (dirname (cuirass-configuration-database config)))
(user (cuirass-configuration-user config))
(group (cuirass-configuration-group config)))
(with-imported-modules '((guix build utils))
@ -121,10 +122,12 @@
(use-modules (guix build utils))
(mkdir-p #$cache)
(mkdir-p #$db)
(let ((uid (passwd:uid (getpw #$user)))
(gid (group:gid (getgr #$group))))
(chown #$cache uid gid))))))
(chown #$cache uid gid)
(chown #$db uid gid))))))
(define cuirass-service-type
(service-type