diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index ccfcd5d..3fb6aa8 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -341,7 +341,13 @@ fn restart_grasscutter(window: tauri::Window) -> bool { #[cfg(unix)] #[tauri::command] -fn restart_grasscutter(window: tauri::Window) {} +fn restart_grasscutter(window: tauri::Window) { + // Placeholder text for imports + let s = System::new(); + if let Some(process) = s.process(Pid::from(1337)) { + println!("{}", process.name()); + } +} #[cfg(windows)] #[tauri::command] diff --git a/src-tauri/src/system_helpers.rs b/src-tauri/src/system_helpers.rs index c1a65a0..305856a 100644 --- a/src-tauri/src/system_helpers.rs +++ b/src-tauri/src/system_helpers.rs @@ -1,7 +1,7 @@ use duct::cmd; use ini::Ini; -use std::path::PathBuf; use std::ffi::OsStr; +use std::path::PathBuf; #[cfg(windows)] use { @@ -245,6 +245,10 @@ pub fn service_status(service: String) -> bool { } } +#[cfg(unix)] +#[tauri::command] +pub fn service_status(service: String) {} + #[cfg(windows)] #[tauri::command] pub fn start_service(service: String) -> bool {