#!bin/bash
wget -q fw.movimatica.com/NVT3_realtime/realtime.tar

tar -xf realtime.tar MQTT-conf_realtime.json MQTT_realtime.py script_update.sh MQTT_update.sh paho.mqtt.python.tar.gz -C /etc/realtime/ realtime.service -C /etc/systemd/system/
python3 -m pip install /etc/realtime/paho.mqtt.python.tar.gz

systemctl start realtime.service
systemctl enable realtime.service

rm realtime.tar


