Private
Public Access
1
0

Compare commits

...

3 Commits

Author SHA1 Message Date
abcc5c5e40 fix: use resolved service name for socket activation detection
All checks were successful
CI/CD Pipeline / Code Format (push) Successful in 1s
CI/CD Pipeline / Clippy Lints (push) Successful in 1m11s
CI/CD Pipeline / Unit Tests (push) Successful in 1m29s
CI/CD Pipeline / Security Audit (push) Successful in 5s
CI/CD Pipeline / Build Arch Package (push) Successful in 1m57s
CI/CD Pipeline / Build Debian Package (Ubuntu 22.04) (push) Successful in 1m57s
CI/CD Pipeline / Build Debian Package (push) Successful in 2m23s
CI/CD Pipeline / Build Alpine Package (push) Successful in 3m35s
CI/CD Pipeline / Build RPM Package (push) Successful in 3m54s
2026-05-07 01:42:20 +00:00
3ea0194c6c fix: remove duplicate comment causing cargo fmt failure
All checks were successful
CI/CD Pipeline / Code Format (push) Successful in 1s
CI/CD Pipeline / Clippy Lints (push) Successful in 38s
CI/CD Pipeline / Unit Tests (push) Successful in 1m39s
CI/CD Pipeline / Security Audit (push) Successful in 5s
CI/CD Pipeline / Build Arch Package (push) Successful in 1m57s
CI/CD Pipeline / Build Debian Package (Ubuntu 22.04) (push) Successful in 1m57s
CI/CD Pipeline / Build Debian Package (push) Successful in 2m24s
CI/CD Pipeline / Build Alpine Package (push) Successful in 3m30s
CI/CD Pipeline / Build RPM Package (push) Successful in 3m26s
2026-05-05 18:18:57 +00:00
fb3ba3f2c1 chore: bump to v0.3.10 for CI trigger
Some checks failed
CI/CD Pipeline / Code Format (push) Failing after 1s
CI/CD Pipeline / Clippy Lints (push) Successful in 37s
CI/CD Pipeline / Unit Tests (push) Successful in 49s
CI/CD Pipeline / Build Debian Package (push) Has been skipped
CI/CD Pipeline / Build Debian Package (Ubuntu 22.04) (push) Has been skipped
CI/CD Pipeline / Build RPM Package (push) Has been skipped
CI/CD Pipeline / Build Alpine Package (push) Has been skipped
CI/CD Pipeline / Build Arch Package (push) Has been skipped
CI/CD Pipeline / Security Audit (push) Successful in 4s
2026-05-05 18:11:37 +00:00
3 changed files with 18 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "linux-patch-api"
version = "0.3.9"
version = "0.3.12"
edition = "2021"
authors = ["Echo <echo@moon-dragon.us>"]
description = "Secure remote package management API for Linux systems"

14
debian/changelog vendored
View File

@ -1,3 +1,17 @@
linux-patch-api (0.3.12-1) unstable; urgency=low
* Fix socket activation detection to use resolved service name
* Queries like "sshd" now correctly resolve to "ssh.socket" for socket activation
-- Echo <echo@moon-dragon.us> Tue, 06 May 2026 20:42:00 -0500
linux-patch-api (0.3.10-1) unstable; urgency=low
* Fix socket activation detection for service status healthy logic
* When service is inactive but enabled, check if .socket unit is active
-- Echo <echo@moon-dragon.us> Mon, 05 May 2026 13:10:00 -0500
linux-patch-api (0.3.9-1) unstable; urgency=low
* Fix socket activation detection for service status healthy logic

View File

@ -568,11 +568,12 @@ fn get_systemd_service_status(name: &str) -> Result<Option<ServiceStatus>> {
let healthy = active_state == "active" && sub_state == "running";
// Check for socket activation: if service is inactive but enabled,
// check if the corresponding .socket unit is active (listening)
let healthy = if !healthy && active_state == "inactive" && unit_file_state == "enabled" {
let socket_name = format!("{}.socket", name.trim_end_matches(".service"));
// Use the resolved service name (id) instead of input name,
// so "sshd" resolves to "ssh.service" → "ssh.socket" correctly
let socket_name = format!("{}.socket", id.trim_end_matches(".service"));
if let Ok(socket_output) = Command::new("systemctl")
.args(["show", &socket_name, "--property=ActiveState", "--no-pager"])
.output()