diff --git a/clis/teliod/src/command_listener.rs b/clis/teliod/src/command_listener.rs index cb72d7835..fce865bc0 100644 --- a/clis/teliod/src/command_listener.rs +++ b/clis/teliod/src/command_listener.rs @@ -88,6 +88,7 @@ impl CommandListener { TeliodError::CommandFailed(ClientCmd::QuitDaemon) }) } + ClientCmd::IsAlive => Ok(CommandResponse::Ok), } } diff --git a/clis/teliod/src/main.rs b/clis/teliod/src/main.rs index cbfebdb9a..2fe531a11 100644 --- a/clis/teliod/src/main.rs +++ b/clis/teliod/src/main.rs @@ -37,6 +37,8 @@ const TIMEOUT_SEC: u64 = 1; enum ClientCmd { #[clap(about = "Retrieve the status report")] GetStatus, + #[clap(about = "Query if daemon is running")] + IsAlive, #[clap(about = "Stop daemon execution")] QuitDaemon, } diff --git a/clis/teliod/src/qnap.rs b/clis/teliod/src/qnap.rs index 1d735d454..c5ab8ae5b 100644 --- a/clis/teliod/src/qnap.rs +++ b/clis/teliod/src/qnap.rs @@ -90,7 +90,7 @@ pub(crate) fn handle_request(request: Request) -> Response { } fn is_teliod_running() -> bool { - matches!(teliod_blocking_query!(ClientCmd::GetStatus), Ok(Ok(_))) + matches!(teliod_blocking_query!(ClientCmd::IsAlive), Ok(Ok(_))) } fn shutdown_teliod() -> Result<(), TeliodError> {