all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <rekado@elephly.net>
To: Christopher Allan Webber <cwebber@dustycloud.org>
Cc: guix-devel@gnu.org
Subject: Re: (Exposing?) config files and non-start/stop operations
Date: Sat, 26 Nov 2016 14:47:22 +0100	[thread overview]
Message-ID: <87eg1yz72t.fsf@elephly.net> (raw)
In-Reply-To: <87fumghvdc.fsf@dustycloud.org>


Christopher Allan Webber <cwebber@dustycloud.org> writes:

>  - We could also have a shepherd action like "herd config mediagoblin"
>    that would merely spit out the configuration file path... so someone
>    could do something like:
>      $ foo-db dump-db --config `herd config foo-db`

Here’s another similar idea:

    herd environment <service> -- some command

The environment for a service may be represented by a bunch of
environment variables.  “some command” then runs within this
environment and can access the variables.

So if “foo-db” can read its configuration file from FOO_DB_CONFIG the
environment definition would be something like

    #~(("FOO_DB_CONFIG" . (string-append #$foo-db "/etc/config")))

In this case a user could do

    herd environment foo-db -- foo-db dump-db

If it doesn’t respect FOO_DB_CONFIG one could do

    herd environment foo-db -- 'foo-db dump-db --config $FOO_DB_CONFIG'

This is all just a crummy bash translation of a reader monad.

-- 
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
http://elephly.net

  parent reply	other threads:[~2016-11-26 13:47 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-20 18:47 (Exposing?) config files and non-start/stop operations Christopher Allan Webber
2016-11-20 22:34 ` Christopher Allan Webber
2016-11-21  4:54   ` Chris Marusich
2016-11-21 16:18     ` Christopher Allan Webber
2016-11-21 16:53       ` Christopher Allan Webber
2016-11-22  4:13         ` Chris Marusich
2016-11-22 17:21           ` Christopher Allan Webber
2016-11-22 22:59             ` Ludovic Courtès
2016-11-23  5:28             ` Chris Marusich
2016-11-22 22:57       ` Ludovic Courtès
2016-11-23 22:03         ` Christopher Allan Webber
2016-11-24 13:31           ` Ludovic Courtès
2016-11-25  7:27             ` Christopher Allan Webber
2016-11-26 12:40               ` Chris Marusich
2016-11-27 15:39                 ` Christopher Allan Webber
2016-11-29  3:06                   ` Chris Marusich
2016-11-26 13:47               ` Ricardo Wurmus [this message]
2016-11-26 17:40                 ` Ludovic Courtès
2016-11-27 15:47                   ` Christopher Allan Webber
2016-11-26 17:43               ` Ludovic Courtès
2016-11-27 15:48                 ` Christopher Allan Webber
2016-11-21 14:18   ` Ludovic Courtès
2016-11-21 16:21     ` Christopher Allan Webber

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=87eg1yz72t.fsf@elephly.net \
    --to=rekado@elephly.net \
    --cc=cwebber@dustycloud.org \
    --cc=guix-devel@gnu.org \
    /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.