From 823b92303ad1d311e0ea1bbd915fc12e3cacb1e1 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 17 Mar 2023 15:35:26 -0300 Subject: queue.scm: Put Dovecot config file under /etc/dovecot/dovecot.conf by default --- src/org/euandre/queue.scm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/org/euandre') diff --git a/src/org/euandre/queue.scm b/src/org/euandre/queue.scm index c331cdd..fcb65ab 100644 --- a/src/org/euandre/queue.scm +++ b/src/org/euandre/queue.scm @@ -1356,7 +1356,8 @@ max_age: 604800 (mail-in-home? dovecot-configuration-mail-in-home? (default #f)) (raw-file dovecot-configuration-raw-file (default #f)) (extra-content dovecot-configuration-extra-content (default "")) - (config-name dovecot-configuration-config-name (default "dovecot.conf")) + (config-dirname dovecot-configuration-config-dirname (default "dovecot")) + (config-filename dovecot-configuration-config-filename (default "dovecot.conf")) (user dovecot-configuration-user (default "dovecot")) (group dovecot-configuration-group (default "dovecot")) (auth-worker-group dovecot-configuration-auth-worker-group (default "etc-shadow")) @@ -1446,10 +1447,13 @@ namespace inbox { (define (dovecot-etc-files config) (match-record config - (raw-file config-name) - `((,config-name ,(plain-file config-name - (or raw-file - (generate-dovecot-config config))))))) + (raw-file config-dirname config-filename) + `((,config-dirname + ,(file-union + config-dirname + `((,config-filename ,(plain-file config-filename + (or raw-file + (generate-dovecot-config config)))))))))) (define (dovecot-accounts config) (match-record config @@ -1505,8 +1509,8 @@ namespace inbox { (define (dovecot-shepherd-service config) (match-record config - (dovecot config-name) - (let ((config-file (string-append "/etc/" config-name))) + (dovecot config-dirname config-filename) + (let ((config-file (string-append "/etc/" config-dirname "/" config-filename))) (list (shepherd-service (provision '(dovecot)) -- cgit v1.2.3