FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

12671 questions

15052 answers

24115 comments

47054 members

0 votes
585 views 0 comments
by
Hi there, I need to send the state of the digital pins 1 and 2, and the value of the analog pin to a MQTT server, (I'm can also send it througt HTTP), for that I'd like to run a python script in the background, but I need to run this script as soon the device boot up and make sure that it keeps running, and if there any problem and the script crash, run it again.

Can anyone suggest me the best way to achive this?

Thanks in advanced, and I wish you all a happy new year!

Device: TRB141

FW Ver: TRB1_R_00.07.00.1

1 Answer

0 votes
by
Hi,

write an init script for that. In ex.: /etc/init.d/my_script