services: web: Fix nginx-service-type's ‘file’ procedure.
* gnu/services/web.scm (nginx-activation, nginx-shepherd-service): Replace references to non-existent ‘config-file’ with ‘file’. * doc/guix.texi (Web Services): Likewise.
This commit is contained in:
parent
4695472f8a
commit
352a5b639b
|
@ -39,7 +39,8 @@ Copyright @copyright{} 2017 humanitiesNerd@*
|
||||||
Copyright @copyright{} 2017 Christopher Allan Webber@*
|
Copyright @copyright{} 2017 Christopher Allan Webber@*
|
||||||
Copyright @copyright{} 2017 Marius Bakke@*
|
Copyright @copyright{} 2017 Marius Bakke@*
|
||||||
Copyright @copyright{} 2017 Hartmut Goebel@*
|
Copyright @copyright{} 2017 Hartmut Goebel@*
|
||||||
Copyright @copyright{} 2017 Maxim Cournoyer
|
Copyright @copyright{} 2017 Maxim Cournoyer@*
|
||||||
|
Copyright @copyright{} 2017 Tobias Geerinckx-Rice
|
||||||
|
|
||||||
Permission is granted to copy, distribute and/or modify this document
|
Permission is granted to copy, distribute and/or modify this document
|
||||||
under the terms of the GNU Free Documentation License, Version 1.3 or
|
under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||||
|
@ -14139,13 +14140,12 @@ requests with two servers.
|
||||||
"server2.example.com")))))))
|
"server2.example.com")))))))
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
@item @code{config-file} (default: @code{#f})
|
@item @code{file} (default: @code{#f})
|
||||||
If the @var{config-file} is provided, this will be used, rather than
|
If a configuration @var{file} is provided, this will be used, rather than
|
||||||
generating a configuration file from the provided @code{log-directory},
|
generating a configuration file from the provided @code{log-directory},
|
||||||
@code{run-directory}, @code{server-list} and @code{upstream-list}. For
|
@code{run-directory}, @code{server-list} and @code{upstream-list}. For
|
||||||
proper operation, these arguments should match what is in
|
proper operation, these arguments should match what is in @var{file} to
|
||||||
@var{config-file} to ensure that the directories are created when the
|
ensure that the directories are created when the service is activated.
|
||||||
service is activated.
|
|
||||||
|
|
||||||
This can be useful if you have an existing configuration file, or it's
|
This can be useful if you have an existing configuration file, or it's
|
||||||
not possible to do what is required through the other parts of the
|
not possible to do what is required through the other parts of the
|
||||||
|
|
|
@ -262,7 +262,7 @@ of index files."
|
||||||
(define nginx-activation
|
(define nginx-activation
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <nginx-configuration> nginx log-directory run-directory server-blocks
|
(($ <nginx-configuration> nginx log-directory run-directory server-blocks
|
||||||
upstream-blocks config-file)
|
upstream-blocks file)
|
||||||
#~(begin
|
#~(begin
|
||||||
(use-modules (guix build utils))
|
(use-modules (guix build utils))
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ of index files."
|
||||||
(mkdir-p (string-append #$run-directory "/logs"))
|
(mkdir-p (string-append #$run-directory "/logs"))
|
||||||
;; Check configuration file syntax.
|
;; Check configuration file syntax.
|
||||||
(system* (string-append #$nginx "/sbin/nginx")
|
(system* (string-append #$nginx "/sbin/nginx")
|
||||||
"-c" #$(or config-file
|
"-c" #$(or file
|
||||||
(default-nginx-config nginx log-directory
|
(default-nginx-config nginx log-directory
|
||||||
run-directory server-blocks upstream-blocks))
|
run-directory server-blocks upstream-blocks))
|
||||||
"-t")))))
|
"-t")))))
|
||||||
|
@ -289,14 +289,14 @@ of index files."
|
||||||
(define nginx-shepherd-service
|
(define nginx-shepherd-service
|
||||||
(match-lambda
|
(match-lambda
|
||||||
(($ <nginx-configuration> nginx log-directory run-directory server-blocks
|
(($ <nginx-configuration> nginx log-directory run-directory server-blocks
|
||||||
upstream-blocks config-file)
|
upstream-blocks file)
|
||||||
(let* ((nginx-binary (file-append nginx "/sbin/nginx"))
|
(let* ((nginx-binary (file-append nginx "/sbin/nginx"))
|
||||||
(nginx-action
|
(nginx-action
|
||||||
(lambda args
|
(lambda args
|
||||||
#~(lambda _
|
#~(lambda _
|
||||||
(zero?
|
(zero?
|
||||||
(system* #$nginx-binary "-c"
|
(system* #$nginx-binary "-c"
|
||||||
#$(or config-file
|
#$(or file
|
||||||
(default-nginx-config nginx log-directory
|
(default-nginx-config nginx log-directory
|
||||||
run-directory server-blocks upstream-blocks))
|
run-directory server-blocks upstream-blocks))
|
||||||
#$@args))))))
|
#$@args))))))
|
||||||
|
|
Loading…
Reference in New Issue