Skip to content

Exporting run's "$srv_dir" to the user's shell? #16

@capezotte

Description

@capezotte

I'm currently writing an s6 (or s6-rc, not sure yet) backend for Turnstile.

The developer's recommendation is to make copies of the service definitions a RAM filesystem, and start the supervision suite there. The run script's third argument, srv_dir seems a good place for doing that, but, since this is djbware, this means the its path must be made known (or guessed) in order for the user to be able to issue commands to the supervisors.

Exporting its path to the environment, or at least documenting how the path is built, seems like a simplest way to enable using the turnstile's "service manager state" directory in this case.


FWIW, a possible alternative is a "control" service that runs commands on behalf of the user with the correct working directory, which could part of the backend's default service set (I believe I'll need something like this anyway since I plan to give an option to store the service's logs in a separate, rotated folder). s6 comes with the bits needed for creating one, without additional dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions