Fix SSH connection count and re-enable nginx site accessibility check
- Use full path /run/current-system/sw/bin/ss for SSH connection counting - Re-enable nginx site accessibility checking with full curl path - This should show SSH connection counts and verify which nginx sites are accessible
This commit is contained in:
parent
5a215fc259
commit
2e67f17d6c
@ -446,7 +446,7 @@ impl ServiceCollector {
|
|||||||
|
|
||||||
async fn get_ssh_active_users(&self) -> Option<String> {
|
async fn get_ssh_active_users(&self) -> Option<String> {
|
||||||
// Use ss to find established SSH connections on port 22
|
// Use ss to find established SSH connections on port 22
|
||||||
let output = Command::new("ss")
|
let output = Command::new("/run/current-system/sw/bin/ss")
|
||||||
.args(["-tn", "state", "established", "sport", "= :22"])
|
.args(["-tn", "state", "established", "sport", "= :22"])
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.stderr(Stdio::piped())
|
.stderr(Stdio::piped())
|
||||||
@ -701,8 +701,9 @@ impl ServiceCollector {
|
|||||||
// Check which sites are actually accessible
|
// Check which sites are actually accessible
|
||||||
let mut accessible_sites = Vec::new();
|
let mut accessible_sites = Vec::new();
|
||||||
for site in sites {
|
for site in sites {
|
||||||
// Temporarily disable accessibility check - show all parsed sites
|
if self.check_site_accessibility(&site).await {
|
||||||
accessible_sites.push(site); // Remove checkmark - status will be shown via sub_service row status
|
accessible_sites.push(site); // Remove checkmark - status will be shown via sub_service row status
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Limit to reasonable number
|
// Limit to reasonable number
|
||||||
@ -766,7 +767,7 @@ impl ServiceCollector {
|
|||||||
|
|
||||||
match tokio::time::timeout(
|
match tokio::time::timeout(
|
||||||
Duration::from_secs(5),
|
Duration::from_secs(5),
|
||||||
Command::new("curl")
|
Command::new("/run/current-system/sw/bin/curl")
|
||||||
.args(["-s", "-I", "--max-time", "3", &url])
|
.args(["-s", "-I", "--max-time", "3", &url])
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.stderr(Stdio::piped())
|
.stderr(Stdio::piped())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user