Skip to main content

install_unit

Function install_unit 

Source
pub(crate) fn install_unit(
    state: &Path,
    port: u16,
    extra: &[String],
) -> Result<(PathBuf, PathBuf), String>
Expand description

Renders the supervision file and hands the node to the service manager, returning the unit written and the choir it runs.

Factored out of choir node install when choir host needed to do exactly this as one of its steps. Not “install, but quieter”: the same refusals in the same order, because the way a first-run command goes wrong is by being a second implementation of the thing it is composing, one refusal short.

§Errors

Returns the sentence the caller should print, for a machine with no service manager, a choir in a build directory, a state directory with no node in it, or a service manager that refused.