mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-20 06:37:08 +01:00
gnu: dovecot: Use standard mkdir-p/perms.
* gnu/services/mail.scm (%dovecot-activation): Use (gnu build utils).
This commit is contained in:
parent
62a3756bd9
commit
853b49c419
1 changed files with 56 additions and 58 deletions
|
@ -35,6 +35,7 @@ (define-module (gnu services mail)
|
|||
#:use-module (gnu packages admin)
|
||||
#:use-module (gnu packages dav)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (guix modules)
|
||||
#:use-module (guix records)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix gexp)
|
||||
|
@ -1512,12 +1513,9 @@ (define (%dovecot-activation config)
|
|||
(lambda ()
|
||||
(serialize-configuration config
|
||||
dovecot-configuration-fields)))))))
|
||||
(with-imported-modules (source-module-closure '((gnu build activation)))
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(define (mkdir-p/perms directory owner perms)
|
||||
(mkdir-p directory)
|
||||
(chown "/var/run/dovecot" (passwd:uid owner) (passwd:gid owner))
|
||||
(chmod directory perms))
|
||||
(use-modules (guix build utils) (gnu build activation))
|
||||
(define (build-subject parameters)
|
||||
(string-concatenate
|
||||
(map (lambda (pair)
|
||||
|
@ -1569,7 +1567,7 @@ (define* (create-self-signed-certificate-if-absent
|
|||
#:private-key "/etc/dovecot/private/default.pem"
|
||||
#:public-key "/etc/dovecot/default.pem"
|
||||
#:owner (getpwnam "root")
|
||||
#:common-name (format #f "Dovecot service on ~a" (gethostname)))))))
|
||||
#:common-name (format #f "Dovecot service on ~a" (gethostname))))))))
|
||||
|
||||
(define (dovecot-shepherd-service config)
|
||||
"Return a list of <shepherd-service> for CONFIG."
|
||||
|
|
Loading…
Reference in a new issue