Running python code when wifi connects - Raspberry Pi Forums
i'm running latest version of raspbian stretch, , have python file run when connect internet. emails ip address of pi, plan on running headless, , way don't need static ip address. have put copy of in both /etc/network/interfaces.if-up.d/ , /etc/dhcp/dhclient-enter-hooks.d/, doesn't run when connect internet.
when send it.
how can working in raspbian stretch? managed working fine on ubuntu server doing this.
when
code: select all
sudo ifdown eth0 && sudo ifup eth0
how can working in raspbian stretch? managed working fine on ubuntu server doing this.
i came cludgy way - wrote python application loops every 30 seconds, checking state of internet connection. it's on github @ https://github.com/michaelcjhurst/internetchecker. this'll now, if there better alternative, please let me know.
raspberrypi
Comments
Post a Comment