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.
This commit is contained in:
parent
52bc23b850
commit
679225510e
1 changed files with 1 additions and 1 deletions
|
|
@ -1499,7 +1499,7 @@ if ! command -v systemctl >/dev/null 2>&1; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
if [[ -x "$INSTALLER" && -f "$CTID_FILE" ]]; then
|
||||||
log "Service unit missing; attempting reinstall"
|
log "Service unit missing; attempting reinstall"
|
||||||
bash "$INSTALLER" --ctid "$(cat "$CTID_FILE")" --skip-restart --quiet || log "Reinstall attempt failed"
|
bash "$INSTALLER" --ctid "$(cat "$CTID_FILE")" --skip-restart --quiet || log "Reinstall attempt failed"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue