Closed robmarkcole closed 4 years ago
Something like
--- Run sudo nano /etc/systemd/system/envmqtt.service --- Edit file [Unit] Description=Enviro+ MQTT Logger After=network.target [Service] ExecStart=/usr/bin/python3 /usr/src/enviroplus/examples/mqtt-all.py --broker <IP-address> WorkingDirectory=/usr/src/enviroplus/examples StandardOutput=inherit StandardError=inherit Restart=always User=pi [Install] WantedBy=multi-user.target --- Run sudo systemctl enable envmqtt.service sudo systemctl start envmqtt.service
done
Something like