mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
services: cuirass: Create remote-server cache directory.
* gnu/services/cuirass.scm (cuirass-activation): Create remote-server cache directory if needed. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This commit is contained in:
parent
8d8bbe7c63
commit
5ba7e828ad
1 changed files with 17 additions and 6 deletions
|
@ -243,11 +243,16 @@ (define (cuirass-postgresql-role config)
|
|||
|
||||
(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))
|
||||
(log "/var/log/cuirass")
|
||||
(group (cuirass-configuration-group config)))
|
||||
(let* ((cache (cuirass-configuration-cache-directory config))
|
||||
(remote-server (cuirass-configuration-remote-server config))
|
||||
(remote-cache (and remote-server
|
||||
(cuirass-remote-server-configuration-cache
|
||||
remote-server)))
|
||||
(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
|
||||
(use-modules (guix build utils))
|
||||
|
@ -256,11 +261,17 @@ (define (cuirass-activation config)
|
|||
(mkdir-p #$db)
|
||||
(mkdir-p #$log)
|
||||
|
||||
(when #$remote-cache
|
||||
(mkdir-p #$remote-cache))
|
||||
|
||||
(let ((uid (passwd:uid (getpw #$user)))
|
||||
(gid (group:gid (getgr #$group))))
|
||||
(chown #$cache uid gid)
|
||||
(chown #$db uid gid)
|
||||
(chown #$log uid gid))))))
|
||||
(chown #$log uid gid)
|
||||
|
||||
(when #$remote-cache
|
||||
(chown #$remote-cache uid gid)))))))
|
||||
|
||||
(define (cuirass-log-rotations config)
|
||||
"Return the list of log rotations that corresponds to CONFIG."
|
||||
|
|
Loading…
Reference in a new issue