14 lines
274 B
Bash
Raw Normal View History

2024-05-14 16:11:08 +03:00
#!/bin/bash
#set -x
count=1
while :
do
payload=`date "+%Y/%m/%d %H:%M:%S"`
#payload="count=${count}"
echo ${payload}
mosquitto_pub -h broker.emqx.io -p 1883 -t "/topic/mirf/test" -m "$payload"
count=$((++count))
sleep 1
done