aboutsummaryrefslogtreecommitdiff
path: root/src/org/euandre
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2023-03-17 17:12:01 -0300
committerEuAndreh <eu@euandre.org>2023-03-17 17:12:01 -0300
commit617a40eaebefc4b95725764e8bc2d11207c57c7a (patch)
tree9715587e8e2992bfdc527416a068d9b1c65bb9b0 /src/org/euandre
parentqueue.scm: Rename dovecot-configuration-{dovecot => package} (diff)
downloadpackage-repository-617a40eaebefc4b95725764e8bc2d11207c57c7a.tar.gz
package-repository-617a40eaebefc4b95725764e8bc2d11207c57c7a.tar.xz
queue.scm: Simplify Dovecot activation
Diffstat (limited to 'src/org/euandre')
-rw-r--r--src/org/euandre/queue.scm28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm
index ab43649..ac91178 100644
--- a/src/org/euandre/queue.scm
+++ b/src/org/euandre/queue.scm
@@ -1470,23 +1470,23 @@ namespace inbox {
(base-dir state-dir)
#~(begin
(use-modules (guix build utils))
- (let ((user (getpwnam "root")))
+ (let ((user (getpwnam "root"))
+ (dhparam.pem (string-append #$state-dir "/dhparam.pem")))
(format (current-error-port)
"Creating Dovecot base_dir directory: \"~a\".~%" #$base-dir)
- (mkdir-p/perms #$base-dir user #o755)
- (let ((dhparam.pem (string-append #$state-dir "/dhparam.pem")))
- (mkdir-p/perms #$state-dir user #o755)
- (unless (file-exists? dhparam.pem)
+ (mkdir-p/perms #$base-dir user #o755)
+ (mkdir-p/perms #$state-dir user #o755)
+ (unless (file-exists? dhparam.pem)
+ (format (current-error-port)
+ "dhparam.pem file doesn't exist yet. Generating one...~%")
+ (cond
+ ((zero? (system* (string-append #$openssl "/bin/openssl")
+ "dhparam" "-out" dhparam.pem "2048"))
+ (format (current-error-port)
+ "Dovecot2 dhparam.pem file created: \"~a\".~%" dhparam.pem))
+ (else
(format (current-error-port)
- "dhparam.pem file doesn't exist yet. Generating one...~%")
- (cond
- ((zero? (system* (string-append #$openssl "/bin/openssl")
- "dhparam" "-out" dhparam.pem "2048"))
- (format (current-error-port)
- "Dovecot2 dhparam.pem file created: \"~a\".~%" dhparam.pem))
- (else
- (format (current-error-port)
- "Failed to create dhparam.pem file: \"~a\".~%" dhparam.pem)))))))))
+ "Failed to create dhparam.pem file: \"~a\".~%" dhparam.pem))))))))
(define (dovecot-shepherd-service config)
(match-record config <dovecot-configuration>