From 82af8a772723987d6604f770b915b732a859ac81 Mon Sep 17 00:00:00 2001 From: roleo Date: Thu, 8 Jun 2023 14:17:16 +0200 Subject: [PATCH] Improve check_conf.sh --- .../static/home/yi-hack/script/mqtt_advertise/check_conf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/static/static/home/yi-hack/script/mqtt_advertise/check_conf.sh b/src/static/static/home/yi-hack/script/mqtt_advertise/check_conf.sh index 1d5ed02..1c2e2c9 100755 --- a/src/static/static/home/yi-hack/script/mqtt_advertise/check_conf.sh +++ b/src/static/static/home/yi-hack/script/mqtt_advertise/check_conf.sh @@ -48,7 +48,7 @@ HOMEASSISTANT_QOS=0 for i in $PARMS1; do if [ ! -z "$i" ]; then PAR=$(echo "$i" | cut -d= -f1) - MATCH=$(cat $CONF_MQTT_ADVERTISE_FILE | grep $PAR) + MATCH=$(cat $CONF_MQTT_ADVERTISE_FILE | grep ^$PAR=) if [ -z "$MATCH" ]; then echo "$i" >>$CONF_MQTT_ADVERTISE_FILE fi