MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / service_spec

Function service_spec

src/daemon/service.rs:253–264  ·  view source on GitHub ↗
(
    tracedecay_bin: impl Into<PathBuf>,
    socket: Option<String>,
)

Source from the content-addressed store, hash-verified

251}
252
253pub fn service_spec(
254 tracedecay_bin: impl Into<PathBuf>,
255 socket: Option<String>,
256) -> Result<DaemonServiceSpec> {
257 Ok(DaemonServiceSpec {
258 tracedecay_bin: tracedecay_bin.into(),
259 socket_path: socket_path_or_default(socket)?,
260 data_dir_override: std::env::var_os(crate::config::USER_DATA_DIR_ENV)
261 .filter(|value| !value.is_empty())
262 .map(PathBuf::from),
263 })
264}
265
266pub fn install_service(spec: &DaemonServiceSpec, start: bool) -> Result<PathBuf> {
267 let runner = ServiceRunner::current()?;

Callers 2

dispatch_commandFunction · 0.85
refresh_daemon_serviceFunction · 0.85

Calls 2

socket_path_or_defaultFunction · 0.85
is_emptyMethod · 0.45

Tested by

no test coverage detected