Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Silence broken pipe error in sensor proxy self-heal script (related to #628)

rcourtman679225510e8a
diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh
index df2401b70b..da361b320f 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"