MCPcopy Create free account
hub / github.com/clawshell/clawshell / cmd_restart

Function cmd_restart

src/main.rs:830–844  ·  view source on GitHub ↗
(config_path: &str)

Source from the content-addressed store, hash-verified

828}
829
830async fn cmd_restart(config_path: &str) -> Result<(), Box<dyn std::error::Error>> {
831 tui::print_banner("Restart");
832 let path = PathBuf::from(config_path);
833 ensure_config_migrated(&path)?;
834 Config::from_file(&path)
835 .map_err(|e| format!("Failed to load configuration from '{}': {}", config_path, e))?;
836 ensure_service_config_matches(&path)?;
837
838 tui::print_info("Config", config_path);
839 println!("Restarting ClawShell via service manager...");
840 platform::service_restart()?;
841 tui::print_success("ClawShell restarted successfully.");
842 tui::print_info("Logs", &process::log_file_path().display().to_string());
843 Ok(())
844}
845
846async fn cmd_logs(
847 level: Option<String>,

Callers 1

mainFunction · 0.85

Calls 7

print_bannerFunction · 0.85
ensure_config_migratedFunction · 0.85
print_infoFunction · 0.85
print_successFunction · 0.85
log_file_pathFunction · 0.70
service_restartFunction · 0.50

Tested by

no test coverage detected