I have a Raspberry Pi 3 Model B Rev 1.2 running Raspbian GNU/Linux 10 (buster). I've been running into a very annoying issue - whenever my home wifi drops (and it does every night because Synology doesn't know how to implement guest networks right) my Pi goes offline and never recovers.
There have been a few posts (example) but they are quite old and suggest things like /sbin/ifup which are no longer correct.
What is the best way to deal with this? It looks like running sudo systemctl restart dhcpcd.service
when the network is down as a regular cron job is my best bet, but I wonder if there is a cleaner solution.
To rephrase this: when my home wifi becomes unavailable, the Pi goes offline (expected). When my home wifi recovers, the Pi does not. Is it possible to configure my Pi to automatically recover without the help of a manual cron job?
For the reference, I currently run https://gist.github.com/davidair/64cfb6afa601e4fdd73e30b94c218a2b on a 2 minute cron.