My script is /home/hello.py and it is using the Bottle web framework. My script needs to run after Raspberry Pi has connected to my local network. If I try to automatically run it on the boot, it doesn't work because the network connections just aren't ready yet.
I know I can I use "crontab -e" and add @reboot sleep 60 seconds -- but I don't think a sleep is too reliable.
All other "run script on boot" questions I've seen don't help because they run the scripts too early in the bootup process.
Is there anyway to check if the raspberry pi has connected and then have my python script automatically run?
/etc/network/if-up.d/run long before DHCP has successfully completed obtaining an IP address on my RPi (Debian Jessie). This appears to be a fairly common problem if you are depending on DHCP and not assigning a static address.