summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2017-09-18 21:57:05 +0200
committerJan Nieuwenhuizen <janneke@gnu.org>2017-09-18 21:57:05 +0200
commit2a4d493e28100b8eca7d23300dd872c9f99e1f16 (patch)
tree475ac57813c098a5b57461285156e6d64afa8f25 /bin
parent87ad259dba7de38b6e3ab954cd7b2f655358d877 (diff)
downloadcuirass-2a4d493e28100b8eca7d23300dd872c9f99e1f16.tar
cuirass-2a4d493e28100b8eca7d23300dd872c9f99e1f16.tar.gz
cuirass: Add --listen command line option.
* bin/cuirass.in (show-help): Add help for --listen option. (%options): Add listen option. (main): Pass host to run-cuirass-server. * doc/cuirass.texi (Invocation): Add --listen option. * src/cuirass/http.scm (run-cuirass-server): Add named #:host parameter.
Diffstat (limited to 'bin')
-rw-r--r--bin/cuirass.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/cuirass.in b/bin/cuirass.in
index 18edf1e..0da5c06 100644
--- a/bin/cuirass.in
+++ b/bin/cuirass.in
@@ -41,6 +41,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
Add specifications from SPECFILE to database.
-D --database=DB Use DB to store build results.
-p --port=NUM Port of the HTTP server.
+ --listen=HOST Listen on the network interface for HOST
-I, --interval=N Wait N seconds between each poll
--use-substitutes Allow usage of pre-built substitutes
-V, --version Display version
@@ -55,6 +56,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(specifications (single-char #\S) (value #t))
(database (single-char #\D) (value #t))
(port (single-char #\p) (value #t))
+ (listen (value #t))
(interval (single-char #\I) (value #t))
(use-substitutes (value #f))
(fallback (value #f))
@@ -87,6 +89,7 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(else
(let ((one-shot? (option-ref opts 'one-shot #f))
(port (string->number (option-ref opts 'port "8080")))
+ (host (option-ref opts 'listen "localhost"))
(interval (string->number (option-ref opts 'interval "10")))
(specfile (option-ref opts 'specifications #f)))
(with-database db
@@ -105,4 +108,4 @@ exec ${GUILE:-@GUILE@} --no-auto-compile -e main -s "$0" "$@"
(while #t
(process-specs db (db-get-specifications db))
(sleep interval))))
- (run-cuirass-server db #:port port))))))))))
+ (run-cuirass-server db #:host host #:port port))))))))))