Обновить mqtt-info

This commit is contained in:
ua1zbe
2024-02-25 11:52:01 +00:00
parent 8dedb06ab6
commit 2ab66910b1

View File

@@ -3,7 +3,7 @@ sudo apt install mosquitto-clients -y
содаём скрипт содаём скрипт
sudo nano mqtt.sh sudo nano mqtt.sh
в скрпт вставляем код в скрпт вставляем код
!/bin/bash #!/bin/bash
R=$(uptime -p | cut -d " " -f2-) R=$(uptime -p | cut -d " " -f2-)
mosquitto_pub -h mqtt.ua1zbe.ru -t linux/(здесь поставить название железки без скобок) -m "$R" mosquitto_pub -h mqtt.ua1zbe.ru -t linux/(здесь поставить название железки без скобок) -m "$R"
сохраняем сохраняем