aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/cuirass.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/cuirass.scm')
-rw-r--r--gnu/services/cuirass.scm29
1 files changed, 26 insertions, 3 deletions
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index f92d33bf94..7bd43cd427 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -3,7 +3,7 @@
;;; Copyright © 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 Jan Nieuwenhuizen <janneke@gnu.org>
-;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
;;;
;;; This file is part of GNU Guix.
@@ -52,6 +52,8 @@
(default cuirass))
(log-file cuirass-configuration-log-file ;string
(default "/var/log/cuirass.log"))
+ (web-log-file cuirass-configuration-web-log-file ;string
+ (default "/var/log/cuirass-web.log"))
(cache-directory cuirass-configuration-cache-directory ;string (dir-name)
(default "/var/cache/cuirass"))
(ttl cuirass-configuration-ttl ;integer
@@ -83,6 +85,7 @@
(cuirass-configuration? config)
(let ((cuirass (cuirass-configuration-cuirass config))
(cache-directory (cuirass-configuration-cache-directory config))
+ (web-log-file (cuirass-configuration-web-log-file config))
(log-file (cuirass-configuration-log-file config))
(user (cuirass-configuration-user config))
(group (cuirass-configuration-group config))
@@ -106,8 +109,6 @@
#$(scheme-file "cuirass-specs.scm" specs)
"--database" #$database
"--ttl" #$(string-append (number->string ttl) "s")
- "--port" #$(number->string port)
- "--listen" #$host
"--interval" #$(number->string interval)
#$@(if use-substitutes? '("--use-substitutes") '())
#$@(if one-shot? '("--one-shot") '())
@@ -121,6 +122,28 @@
#:user #$user
#:group #$group
#:log-file #$log-file))
+ (stop #~(make-kill-destructor)))
+ (shepherd-service
+ (documentation "Run Cuirass web interface.")
+ (provision '(cuirass-web))
+ (requirement '(guix-daemon networking))
+ (start #~(make-forkexec-constructor
+ (list (string-append #$cuirass "/bin/cuirass")
+ "--cache-directory" #$cache-directory
+ "--specifications"
+ #$(scheme-file "cuirass-specs.scm" specs)
+ "--database" #$database
+ "--ttl" #$(string-append (number->string ttl) "s")
+ "--web"
+ "--port" #$(number->string port)
+ "--listen" #$host
+ "--interval" #$(number->string interval)
+ #$@(if use-substitutes? '("--use-substitutes") '())
+ #$@(if fallback? '("--fallback") '()))
+
+ #:user #$user
+ #:group #$group
+ #:log-file #$web-log-file))
(stop #~(make-kill-destructor)))))))
(define (cuirass-account config)