diff options
Diffstat (limited to 'src/org')
-rw-r--r-- | src/org/euandre/queue.scm | 28 |
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> |