feat(inventory_agent): use HARMONY_INVENTORY_AGENT_PORT as environment variable to set port
Some checks failed
Run Check Script / check (pull_request) Failing after 25s
Some checks failed
Run Check Script / check (pull_request) Failing after 25s
This commit is contained in:
parent
01da8631da
commit
bc6f7336d2
@ -412,7 +412,7 @@ impl PhysicalHost {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn get_host_uuid() -> String {
|
fn get_host_uuid() -> String {
|
||||||
Self::read_dmi("system-uuid").unwrap_or_else(|| uuid::Uuid::new_v4().to_string())
|
Self::read_dmi("system-uuid").unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Helper methods
|
// Helper methods
|
||||||
|
@ -17,7 +17,7 @@ async fn inventory() -> impl Responder {
|
|||||||
async fn main() -> std::io::Result<()> {
|
async fn main() -> std::io::Result<()> {
|
||||||
env_logger::init();
|
env_logger::init();
|
||||||
|
|
||||||
let port = env::var("PORT").unwrap_or_else(|_| "8080".to_string());
|
let port = env::var("HARMONY_INVENTORY_AGENT_PORT").unwrap_or_else(|_| "8080".to_string());
|
||||||
let bind_addr = format!("0.0.0.0:{}", port);
|
let bind_addr = format!("0.0.0.0:{}", port);
|
||||||
|
|
||||||
log::info!("Starting inventory agent on {}", bind_addr);
|
log::info!("Starting inventory agent on {}", bind_addr);
|
||||||
|
Loading…
Reference in New Issue
Block a user