services: cloudflare-tunnel-shepherd-service: Inline tunnel options.

* rosenthal/services/child-error.scm (cloudflare-tunnel-shepherd-service):
Inline tunnel-options.
wip/index/refs/heads/trunk
Hilton Chain 2 years ago
parent 6f168bc772
commit abeacc8731
No known key found for this signature in database
GPG Key ID: 5E5AA665614917F7
  1. 46
      rosenthal/services/child-error.scm

@ -80,27 +80,31 @@ headers. This can expose sensitive information in your logs.")
extra-tunnel-options extra-tunnel-options
token http2-origin? post-quantum? token http2-origin? post-quantum?
extra-options) extra-options)
(let ((tunnel-options (list (shepherd-service
(list "--no-autoupdate" "--metrics" metrics "--loglevel" log-level))) (documentation "Run cloudflared.")
(list (shepherd-service (provision '(cloudflare-tunnel))
(documentation "Run cloudflared.") (requirement '(networking))
(provision '(cloudflare-tunnel)) (start #~(make-forkexec-constructor
(requirement '(networking)) (list #$cloudflared
(start #~(make-forkexec-constructor "tunnel"
(list #$cloudflared "tunnel" #$@tunnel-options "--no-autoupdate"
#$@extra-tunnel-options "--metrics" #$metrics
"run" "--token" #$token "--loglevel" #$log-level
#$@(if http2-origin? #$@extra-tunnel-options
'("--http2-origin")
'()) "run"
#$@(if post-quantum? "--token" #$token
'("--post-quantum") #$@(if http2-origin?
'()) '("--http2-origin")
#$@extra-options) '())
#:user "cloudflared" #$@(if post-quantum?
#:group "cloudflared" '("--post-quantum")
#:log-file #$log-file)) '())
(stop #~(make-kill-destructor)))))))) #$@extra-options)
#:user "cloudflared"
#:group "cloudflared"
#:log-file #$log-file))
(stop #~(make-kill-destructor)))))))
(define cloudflare-tunnel-service-type (define cloudflare-tunnel-service-type
(service-type (service-type

Loading…
Cancel
Save