aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-12-01 07:49:46 -0300
committerEuAndreh <eu@euandre.org>2022-12-01 07:49:46 -0300
commit22fc7b9f7692e1877a9c2874272d19bd632d7070 (patch)
tree8c757d55c0a945461d692f3f3c107ef6670768ab
parentqueue.scm: give the Cyrus SASL supplementary groups to the forkexec command (diff)
downloadpackage-repository-22fc7b9f7692e1877a9c2874272d19bd632d7070.tar.gz
package-repository-22fc7b9f7692e1877a9c2874272d19bd632d7070.tar.xz
queue.scm: Parameterize DKIMproxy.out config file name
-rw-r--r--src/xyz/euandreh/queue.scm47
1 files changed, 25 insertions, 22 deletions
diff --git a/src/xyz/euandreh/queue.scm b/src/xyz/euandreh/queue.scm
index 89e62dd..359755a 100644
--- a/src/xyz/euandreh/queue.scm
+++ b/src/xyz/euandreh/queue.scm
@@ -484,6 +484,7 @@ collections.OrderedDict that works in Python 2.4-2.6.")
(dkimproxy dkimproxyout-configuration-dkimproxy (default dkimproxy))
(user dkimproxyout-configuration-user (default "dkimproxyout"))
(group dkimproxyout-configuration-group (default "dkimproxyout"))
+ (config-name dkimproxyout-configuration-config-name (default "dkimproxyout.conf"))
(listen dkimproxyout-configuration-listen (default "127.0.0.1:10027"))
(relay dkimproxyout-configuration-relay (default "127.0.0.1:10028"))
(domains dkimproxyout-configuration-domains (default (list (gethostname))))
@@ -518,8 +519,8 @@ keyfile ~a/private.key
(define (dkimproxyout-etc-files config)
(match-record config <dkimproxyout-configuration>
- ()
- `(("dkimproxy_out.conf" ,(plain-file "dkimproxy_out.conf" (generate-out.cf config))))))
+ (config-name)
+ `((,config-name ,(plain-file ,config-name (generate-out.cf config))))))
(define (dkimproxyout-accounts config)
(match-record config <dkimproxyout-configuration>
@@ -578,26 +579,28 @@ keyfile ~a/private.key
(define (dkimproxyout-shepherd-service config)
(match-record config <dkimproxyout-configuration>
- (dkimproxy user group)
- (list
- (shepherd-service
- (provision '(dkimproxy))
- (documentation "FIXME:DOCUMENTATION: heredoc syntax?")
- (start #~(make-forkexec-constructor
- (list
- #$(file-append dkimproxy "/bin/dkimproxy.out")
- "--conf_file=/etc/dkimproxy_out.conf")
- #:user #$user
- #:group #$group))
- (stop #~(make-kill-destructor))
- (actions
- (list
- (shepherd-action
- (name 'configuration)
- (documentation "FIXME:DOCUMENTATION: heredoc syntax?")
- (procedure
- #~(lambda _
- (format #t "/etc/dkimproxy_out.conf~%"))))))))))
+ (dkimproxy user group config-name)
+ (let ((config-file (string-append "/etc/" config-file)))
+ (list
+ (shepherd-service
+ (provision '(dkimproxy))
+ (documentation "FIXME:DOCUMENTATION: heredoc syntax?")
+ (start #~(make-forkexec-constructor
+ (list
+ #$(file-append dkimproxy "/bin/dkimproxy.out")
+ "--conf_file"
+ #$config-file)
+ #:user #$user
+ #:group #$group))
+ (stop #~(make-kill-destructor))
+ (actions
+ (list
+ (shepherd-action
+ (name 'configuration)
+ (documentation "FIXME:DOCUMENTATION: heredoc syntax?")
+ (procedure
+ #~(lambda _
+ (format #t "~a~%" #$config-file)))))))))))
(define-public dkimproxyout-service-type
(service-type