diff --git a/src/server.rs b/src/server.rs index 4f0cdea..9822ca3 100644 --- a/src/server.rs +++ b/src/server.rs @@ -31,8 +31,7 @@ fn main() -> Result<(), Box> { sys.refresh_all(); for (pid, process) in sys.processes() { if pid.to_string() == swhkd_pid { - if process.exe() == Path::new("/usr/local/bin/swhks") { - // this is the test hunk + if process.exe() == env::current_exe().unwrap() { log::error!("Server is already running!"); exit(1); }