FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14110 questions

16769 answers

27530 comments

53888 members

0 votes
706 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