From: indieterminacy <indieterminacy@libre.brussels>
To: post@bonni.codes
Cc: help-guix@gnu.org
Subject: Re: trouble defining a shepherd service
Date: Mon, 21 Oct 2024 09:52:15 +0200 [thread overview]
Message-ID: <8f98f94a896a188a078c09f0ef5c7c15@libre.brussels> (raw)
In-Reply-To: <B5110396-61F3-4994-9BA2-3CFA6763A54C@bonni.codes>
Hey,
A passing guess is that this line is incorrect:
> #:directory „/var/openslides"
Try redefining it to this incase:
#:directory "/var/openslides"
HTH
On 2024-10-20 23:56, post@bonni.codes wrote:
> Hello,
> I am trying to define a shepherd service to add to my system
> configuration. Reading the docs this is what I came up with:
>
> (define openslides-shepherd-service
> (shepherd-service
> (documentation "Runs the openslides docker-compose.")
> (provision '(openslides))
> (requirement '(dockerd))
> (start #~(make-forkexec-constructor
> (list
> #$(file-append docker-compose "/bin/docker-compose")
> "up")
> #:directory „/var/openslides"
> #:log-file "/var/log/openslides.log"
> #:pid-file "/var/run/openslides.pid"
> #:user "openslides")
> )
> (stop #~(make-kill-destructor))))
>
> (define openslides-service-type
> (service-type
> (name 'openslides)
> (description "The openslides-service-type")
> (extensions
> (list (service-extension shepherd-root-service-type
> openslides-shepherd-service)))
> (default-value '())
> ))
>
> The service only needs to run the docker-compose program in the
> directory /var/openslides . There is no need for configuration.
> If I build my operating system I get the following error:
>
> ice-9/boot-9.scm:1685:16: In procedure raise-exception:
> Wrong type to apply: #<<shepherd-service> documentation: "Runs the
> openslides docker-compose." provision: (openslides) requirement:
> (dockerd) one-shot?: #f respawn?: #t respawn-limit: #f respawn-delay:
> #f free-form: #f start: #<gexp (make-forkexec-constructor (list
> #<gexp-input #<file-append #<package docker-compose@1.29.2
> gnu/packages/docker.scm:109 7ff9068e96e0> "/bin/docker-compose">:out>
> "up") #:directory "/var/openslides" #:log-file
> "/var/log/openslides.log" #:pid-file "/var/run/openslides.pid" #:user
> "openslides") /home/chris/helios-system/config.scm:38:10 7ff8fe625c00>
> stop: #<gexp (make-kill-destructor)
> /home/chris/helios-system/config.scm:47:9 7ff8fe625bd0> actions: ()
> auto-start?: #t modules: ((shepherd service) ((guix build utils) #:hide
> (delete)) (guix build syscalls))>
>
> indicating that there ist something wrong with the value for the start
> and stop fields.
> Where am I going wrong?
> Kind regards
> bonni
>
>
> -----BEGIN PGP PUBLIC KEY BLOCK-----
>
> mDMEZCntaxYJKwYBBAHaRw8BAQdANbpRRBxZVlIewesVvBOh2tlJCuK22g9lL5ZP
> 9xqJDtS0GGJvbm5pIDxwb3N0QGJvbm5pLmNvZGVzPoiWBBMWCAA+FiEE+lyu2HL6
> Nk0naPZMGyPeqOa1B/sFAmQp7WsCGwMFCQWjmoAFCwkIBwIGFQoJCAsCBBYCAwEC
> HgECF4AACgkQGyPeqOa1B/snGAEAzddi9IcK/2EkrqPy2xmmwzLTAexKqZQqa+EE
> LdtcnNwBANV2xOXW6hASEz0SMz4FEbroFs2kv7by6Wcyy+Fxl0sHuDgEZCntaxIK
> KwYBBAGXVQEFAQEHQMrBS1fZCE1tuYac2MjA9nZit9leM8zlnyiaY6CdO/cRAwEI
> B4h+BBgWCAAmFiEE+lyu2HL6Nk0naPZMGyPeqOa1B/sFAmQp7WsCGwwFCQWjmoAA
> CgkQGyPeqOa1B/v95wD+N/6tRrCX9nqumpXgD3aZ8gcyA1uFSYP02HLyIUIwMY4A
> /2YC4i2z+G3nzMGBrfID2yXVJg4S4Bby/xOkDxKgYrYD
> =EEtE
> -----END PGP PUBLIC KEY BLOCK-----
prev parent reply other threads:[~2024-10-21 7:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-20 21:56 trouble defining a shepherd service post
2024-10-21 7:52 ` indieterminacy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8f98f94a896a188a078c09f0ef5c7c15@libre.brussels \
--to=indieterminacy@libre.brussels \
--cc=help-guix@gnu.org \
--cc=post@bonni.codes \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.