- Dec 11, 1999
- 16,575
- 4,489
- 75
I have an old version of Xubuntu (16.10, I think) on my TV recording computer. It has a custom kernel I didn't want to risk upgrading.
Every so often, the WiFi on that computer goes down. It shows as no signal received. If I go to the computer and manually turn WiFi on and off, it starts working again.
So, I figured, if I write a script to do that every hour, that should fix the WiFi, right?
Script:
And I added to my crontab (as a regular user):
Any idea why it doesn't work?
Every so often, the WiFi on that computer goes down. It shows as no signal received. If I go to the computer and manually turn WiFi on and off, it starts working again.
So, I figured, if I write a script to do that every hour, that should fix the WiFi, right?
Script:
Code:
#!/bin/bash
if ! ping -q -t 1 -c 1 192.168.0.1 > /dev/null ; then
nmcli radio wifi off
sleep 15
nmcli radio wifi on
fi
And I added to my crontab (as a regular user):
Code:
# m h dom mon dow command
30 * * * * /my/path/to/retry_wifi
Any idea why it doesn't work?