Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,6 @@ napi-build = "2"
[profile.release]
lto = true
strip = "symbols"

[target.'cfg(unix)'.dependencies]
sd-notify = "0.5.0"
13 changes: 12 additions & 1 deletion src/server/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,18 @@ impl Server {
let rt = tokio::runtime::Runtime::new().unwrap();
rt.block_on(async move {
let tcp_listener = TcpListener::bind(&addr).await.unwrap();
log::debug!("Server listening on {}", addr);
let server_status_message = format!("Server listening on {}", addr);
log::debug!("{server_status_message}");

#[cfg(unix)]
{
use sd_notify::{NotifyState, notify};
if let Err(e) = notify(&[NotifyState::Ready]) {
log::error!("Failed to notify systemd: {}", e);
}

let _ = notify(&[NotifyState::Status(&server_status_message)]);
}

match acme_config_meta {
Some(acme) => {
Expand Down
Loading