Skip to content

Commit 68f103e

Browse files
author
Paul C
committed
Merge beta: v25.2.78 fix false stopped service badge on minimal containers
2 parents 509c4bb + de3b30c commit 68f103e

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "wolfstack"
3-
version = "25.2.77"
3+
version = "25.2.78"
44
edition = "2024"
55
authors = ["Wolf Software Systems Ltd"]
66
description = "Server management platform for the Wolf software suite"

src/containers/mod.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4124,9 +4124,27 @@ pub struct RuntimeStatus {
41244124
/// Detect Wolf ecosystem services (and web servers) running inside a container.
41254125
/// Returns a list of services found with their running status.
41264126
fn detect_container_services(runtime: &str, name: &str) -> Vec<ContainerService> {
4127-
let script = r#"for s in wolfproxy wolfserve wolfdisk wolfscale nginx apache2 httpd; do
4127+
// Running-check must work on MINIMAL images too. Many app containers
4128+
// (e.g. aonsoku: Alpine/BusyBox running nginx as PID 1 with `daemon off`)
4129+
// have neither systemd nor pgrep, so a `systemctl is-active || pgrep`
4130+
// check falsely reported the service as stopped even though `ps` clearly
4131+
// showed it running (KO4BSR, Jul 2026). Fall back to scanning
4132+
// /proc/<pid>/comm, which needs no extra tooling and matches the kernel's
4133+
// process name — nginx keeps comm "nginx" even though its setproctitle
4134+
// rewrites the cmdline to "nginx: master process ...".
4135+
let script = r#"is_running() {
4136+
systemctl is-active --quiet "$1" 2>/dev/null && return 0
4137+
if command -v pgrep >/dev/null 2>&1; then pgrep -x "$1" >/dev/null 2>&1 && return 0; fi
4138+
for c in /proc/[0-9]*/comm; do
4139+
[ -r "$c" ] || continue
4140+
read cn < "$c" 2>/dev/null || continue
4141+
[ "$cn" = "$1" ] && return 0
4142+
done
4143+
return 1
4144+
}
4145+
for s in wolfproxy wolfserve wolfdisk wolfscale nginx apache2 httpd; do
41284146
if command -v "$s" >/dev/null 2>&1 || [ -f "/etc/systemd/system/${s}.service" ] || [ -f "/usr/lib/systemd/system/${s}.service" ]; then
4129-
if systemctl is-active --quiet "$s" 2>/dev/null || pgrep -x "$s" >/dev/null 2>&1; then
4147+
if is_running "$s"; then
41304148
echo "${s}:running"
41314149
else
41324150
echo "${s}:stopped"

0 commit comments

Comments
 (0)