[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Cuirass service vs. ‘--web’
From: |
Ricardo Wurmus |
Subject: |
Re: Cuirass service vs. ‘--web’ |
Date: |
Sat, 17 Aug 2019 23:47:29 +0200 |
User-agent: |
mu4e 1.2.0; emacs 26.2 |
Hi Ludo,
> In commit 2eb0628a423a36bc21777d7439885baa9a9a8e6d I updated the
> ‘cuirass’ package so it can work with Guile-JSON 3. However, as a
> result, the new ‘cuirass’ package won’t start the web interface unless
> ‘--web’ is passed, right?
Right.
> Should we update the Cuirass service in (gnu services …) so that it
> starts both processes?
>
> (I won’t be able to look into it until the end of next week or so, if
> anyone is willing to give it a spin…)
I wrote this change but hadn’t committed it:
--8<---------------cut here---------------start------------->8---
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm
index f92d33bf94..138a5cf67c 100644
--- a/gnu/services/cuirass.scm
+++ b/gnu/services/cuirass.scm
@@ -106,8 +106,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") '())
@@ -118,6 +116,28 @@
(string-append "GIT_EXEC_PATH=" #$git
"/libexec/git-core"))
+ #: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 #$log-file))
--8<---------------cut here---------------end--------------->8---
--
Ricardo