From 679225510e8a9dcd4302a9226ebfbc31ec13ddd6 Mon Sep 17 00:00:00 2001 From: rcourtman Date: Fri, 7 Nov 2025 17:46:23 +0000 Subject: [PATCH] Silence broken pipe error in sensor proxy self-heal script (related to #628) The self-heal timer runs 'systemctl list-unit-files | grep -q' every hour. When grep matches and exits early, systemctl logs "Failed to print table: Broken pipe" to syslog. This is cosmetic but floods Proxmox logs and confuses operators. Changes: - Redirect stderr from systemctl to /dev/null - Prevents the broken pipe message from reaching syslog - Self-heal functionality unchanged This addresses the concern raised in discussion #628. --- scripts/install-sensor-proxy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh index df2401b..da361b3 100755 --- a/scripts/install-sensor-proxy.sh +++ b/scripts/install-sensor-proxy.sh @@ -1499,7 +1499,7 @@ if ! command -v systemctl >/dev/null 2>&1; then exit 0 fi -if ! systemctl list-unit-files | grep -q "^${SERVICE}\\.service"; then +if ! systemctl list-unit-files 2>/dev/null | grep -q "^${SERVICE}\\.service"; then if [[ -x "$INSTALLER" && -f "$CTID_FILE" ]]; then log "Service unit missing; attempting reinstall" bash "$INSTALLER" --ctid "$(cat "$CTID_FILE")" --skip-restart --quiet || log "Reinstall attempt failed"