File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -113,12 +113,15 @@ subscribe_for_jsonrpc() {
113
113
export MQTT_SUBSCRIBE_TOPIC
114
114
printf %s " ${MQTT_SUBSCRIBE_OPTIONS} " \
115
115
| xargs mosquitto_sub -t " ${MQTT_SUBSCRIBE_TOPIC} /#" -F %j \
116
- | jq --raw-output --compact-output ' to_jsonrpc(env.MQTT_SUBSCRIBE_TOPIC)' \
117
- | if [ " ${LOG_JSONRPC:- false} " != ' true' ]; then
118
- cat -
116
+ | while read -r json; do
117
+ printf ' %s\n' " ${json} " \
118
+ | jq --raw-output --compact-output ' to_jsonrpc(env.MQTT_SUBSCRIBE_TOPIC)' \
119
+ | if [ " ${LOG_JSONRPC:- false} " = ' true' ]; then
120
+ { log " $( tee /dev/fd/3) " ; } 3>&1
119
121
else
120
- while read -r line ; do echo " ${line} " ; log " ${line} " ; done
122
+ cat -
121
123
fi
124
+ done
122
125
}
123
126
124
127
# ######################################
You can’t perform that action at this time.
0 commit comments