diff --git a/install.sh b/install.sh index ee85e7f..0ed9ac1 100755 --- a/install.sh +++ b/install.sh @@ -1702,12 +1702,15 @@ fi'; then echo echo " 2. Re-run the Pulse installer and skip temperature monitoring when prompted" echo + write_install_summary exit 1 fi rm -f "$proxy_script" fi fi + write_install_summary + # Clean final output echo print_success "Pulse installation complete!" @@ -3002,8 +3005,6 @@ print_completion() { fi fi - write_install_summary - echo } diff --git a/scripts/install-sensor-proxy.sh b/scripts/install-sensor-proxy.sh index 4703d87..a83688c 100755 --- a/scripts/install-sensor-proxy.sh +++ b/scripts/install-sensor-proxy.sh @@ -93,7 +93,7 @@ ensure_allowed_nodes_file_reference() { remove_allowed_nodes_block() { if ! command -v python3 >/dev/null 2>&1; then - sed -i '/allowed_nodes:/d' "$CONFIG_FILE" 2>/dev/null || true + sed -i '/^allowed_nodes:/,/^[^[:space:]]/d' "$CONFIG_FILE" 2>/dev/null || true return fi python3 - "$CONFIG_FILE" <<'PY' @@ -137,6 +137,8 @@ while i < len(lines): flush_pending() path.write_text('\n'.join(out) + ('\n' if out else '')) PY + # Fallback cleanup in case formatting prevented python script from matching + sed -i '/^allowed_nodes:/,/^[^[:space:]]/d' "$CONFIG_FILE" 2>/dev/null || true } update_allowed_nodes() {