Skip to content

Commit

Permalink
Merge pull request #1 from alanolimont/alanolimont-patch-1
Browse files Browse the repository at this point in the history
fix the invert condition
  • Loading branch information
alanolimont authored Jun 18, 2022
2 parents f21545b + f90687e commit e424623
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ do
DOWN=$(cat /tmp/fastlog | cut -d' ' -f5)
UP=$(cat /tmp/fastlog | cut -d' ' -f9)

if [[ -z "${MQTT_PASS}" ]]; then
if [[ "${MQTT_PASS}" ]]; then
echo "Sending Data to MQTT ($MQTT_SERVER)"
mosquitto_pub -u $MQTT_USER -P $MQTT_PASS -h $MQTT_SERVER -t $MQTT_DOWN -m $DOWN
mosquitto_pub -u $MQTT_USER -P $MQTT_PASS -h $MQTT_SERVER -t $MQTT_UP -m $UP
Expand All @@ -28,4 +28,4 @@ do

sleep $SLEEP

done
done

0 comments on commit e424623

Please sign in to comment.