()
| 327 | } |
| 328 | |
| 329 | pub fn installed_service_socket_path() -> Result<Option<PathBuf>> { |
| 330 | let service_path = service_unit_path()?; |
| 331 | if !service_path.exists() { |
| 332 | return Ok(None); |
| 333 | } |
| 334 | Ok(socket_path_from_unit_text(&read_service_unit( |
| 335 | &service_path, |
| 336 | )?)) |
| 337 | } |
| 338 | |
| 339 | fn read_service_unit(service_path: &Path) -> Result<String> { |
| 340 | std::fs::read_to_string(service_path).map_err(|e| TraceDecayError::Config { |
no test coverage detected