Try multiple ports for vaultwarden connection detection
This commit is contained in:
parent
c5795e3add
commit
6b22d23a2e
@ -932,9 +932,12 @@ impl ServiceCollector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn get_vaultwarden_info(&self) -> Option<String> {
|
async fn get_vaultwarden_info(&self) -> Option<String> {
|
||||||
// Check HTTP connections - vaultwarden typically runs on port 8000 or behind nginx
|
// Try common vaultwarden ports: 8080, 8084, 8000
|
||||||
|
let ports = ["8080", "8084", "8000"];
|
||||||
|
|
||||||
|
for port in &ports {
|
||||||
let output = Command::new("/run/current-system/sw/bin/ss")
|
let output = Command::new("/run/current-system/sw/bin/ss")
|
||||||
.args(["-tn", "state", "established", "dport", "= :8000"])
|
.args(["-tn", "state", "established", "dport", &format!("= :{}", port)])
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.stderr(Stdio::piped())
|
.stderr(Stdio::piped())
|
||||||
.output()
|
.output()
|
||||||
@ -948,6 +951,7 @@ impl ServiceCollector {
|
|||||||
return Some(format!("{} connections", connection_count));
|
return Some(format!("{} connections", connection_count));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user