FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
915 views 0 comments
by anonymous
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 anonymous
Hi,

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