From 756bd03d5c100a7dd888f02fda735af559eaf066 Mon Sep 17 00:00:00 2001 From: Trevor Pering Date: Tue, 7 Jan 2025 15:19:30 -0800 Subject: [PATCH] Default subType --- bin/pull_mqtt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/pull_mqtt b/bin/pull_mqtt index 9f0001c79..f9d4693a2 100755 --- a/bin/pull_mqtt +++ b/bin/pull_mqtt @@ -38,9 +38,10 @@ sudo mosquitto_sub $SERVER_OPTS -R -F "%j" -t $topic_filter | # Trim whitespace subFolder=$(echo $subFolder | xargs) - subType=$(echo $subType | xargs) + [[ -n $subFolder ]] || subFolder=update - [[ -n ${subFolder% } ]] || subFolder=update + subType=$(echo $subType | xargs) + [[ -n $subType ]] || subType=events if [[ $deviceId == "" ]]; then deviceId=empty