I have a vague idea how this works, could make something myself but I know someone out there will already have something or I’ll have to do some digging as I’m currently too busy to do it myself.
However my PI(s) have been having issues recently with my internet because of issues with my provider I’ve had a bit of an on/off connection - however whenever my internet restarts the PI doesn’t come back online without me unplugging it and restarting it manually. I can’t say I’ve had this issue in the past however I’m sure it never has in the past (or my net has never been off to notice).
So if anyone has anything to restart the PI’s wifi connectivity upon disconnection then feel free. I already have SSH and everything set up so I can control these remotely although this is an issue.
pi@raspberrypi ~ $ mkdir restart
pi@raspberrypi ~ $ cd restart
pi@raspberrypi ~/restart $ vi uptime.sh
pi@raspberrypi ~/restart $ chmod 755 uptime.sh
pi@raspberrypi ~/restart $ crontab -e
no crontab for pi - using an empty one
crontab: installing new crontab
Put that cron in, edited it to /restart/uptime.sh - hope for the best.
Cheers for the script, I found one or two that ping every second but I’d rather not waste all my resources pinging a site every second.
Once every 15 minutes is great though, hoping crontab works as myself and cron’s aren’t best of friends.
Checked /tmp/ at 23:00 and there isn’t anything as of yet.
It appears it wasn’t, I have managed to fix this though and it does appear to be logging; however could I set it as “192.168.0.1” as my own router or? Not like it’s a major issue sending a ping to google.