mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2025-01-14 15:10:16 -05:00
services: hpcguix-web: Add ‘configuration’ action.
* gnu/services/web.scm (hpcguix-web-shepherd-service): Define ‘config-file’ and use it. Add ‘actions’ field. Change-Id: I085df403270039ede3c13f21a5d60682c7510e2e
This commit is contained in:
parent
1de1b975be
commit
4017555367
1 changed files with 6 additions and 6 deletions
|
@ -1229,8 +1229,9 @@ (define %hpcguix-web-log-rotations
|
||||||
(frequency 'weekly))))
|
(frequency 'weekly))))
|
||||||
|
|
||||||
(define (hpcguix-web-shepherd-service config)
|
(define (hpcguix-web-shepherd-service config)
|
||||||
(let ((specs (hpcguix-web-configuration-specs config))
|
(let* ((specs (hpcguix-web-configuration-specs config))
|
||||||
(hpcguix-web (hpcguix-web-package config)))
|
(config-file (and specs (scheme-file "hpcguix-web.scm" specs)))
|
||||||
|
(hpcguix-web (hpcguix-web-package config)))
|
||||||
(with-imported-modules (source-module-closure
|
(with-imported-modules (source-module-closure
|
||||||
'((gnu build shepherd)))
|
'((gnu build shepherd)))
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
|
@ -1246,9 +1247,7 @@ (define (hpcguix-web-shepherd-service config)
|
||||||
#$(number->string
|
#$(number->string
|
||||||
(hpcguix-web-configuration-port config))
|
(hpcguix-web-configuration-port config))
|
||||||
#$@(if specs
|
#$@(if specs
|
||||||
#~((string-append "--config="
|
#~((string-append "--config=" #$config-file))
|
||||||
#$(scheme-file
|
|
||||||
"hpcguix-web.scm" specs)))
|
|
||||||
#~()))
|
#~()))
|
||||||
#:user "hpcguix-web"
|
#:user "hpcguix-web"
|
||||||
#:group "hpcguix-web"
|
#:group "hpcguix-web"
|
||||||
|
@ -1256,7 +1255,8 @@ (define (hpcguix-web-shepherd-service config)
|
||||||
(list "XDG_CACHE_HOME=/var/cache/guix/web"
|
(list "XDG_CACHE_HOME=/var/cache/guix/web"
|
||||||
"SSL_CERT_DIR=/etc/ssl/certs")
|
"SSL_CERT_DIR=/etc/ssl/certs")
|
||||||
#:log-file #$%hpcguix-web-log-file))
|
#:log-file #$%hpcguix-web-log-file))
|
||||||
(stop #~(make-kill-destructor))))))
|
(stop #~(make-kill-destructor))
|
||||||
|
(actions (list (shepherd-configuration-action config-file)))))))
|
||||||
|
|
||||||
(define hpcguix-web-service-type
|
(define hpcguix-web-service-type
|
||||||
(service-type
|
(service-type
|
||||||
|
|
Loading…
Reference in a new issue