From 5f5d065c187b28f5b9bf0eba0fb9698261bd008d Mon Sep 17 00:00:00 2001 From: coolnsx Date: Wed, 22 Oct 2025 15:56:36 +0530 Subject: [PATCH] Spinning up the hamster... --- esphome | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esphome b/esphome index 15a1aa3..8427abd 100755 --- a/esphome +++ b/esphome @@ -26,9 +26,9 @@ run_command() { rm -f "$fifo_file" && mkfifo "$fifo_file" printf "%s\n" "$2" >"$fifo_file" & tail -f "$fifo_file" | websocat "ws://$url/$1" | while read line; do - printf "%b\n" "$line" | sed -nE 's|.*"data": "(.*)n"}|\1|p' + printf "%b\n" "$line" | sed -nE 's|.*"data": "(.*)n"}|\1|p' & # exit this loop if we receive exit from response - printf "%b\n" "$line" | grep -q '"exit"' && pkill -P $$ tail + printf "%b\n" "$line" | grep -q '"exit"' && pkill -P $$ tail & done rm -f "$fifo_file" }