Skip to content

Checks WiFi network Connection and Restarts it if is down

License

Notifications You must be signed in to change notification settings

solosuper/WiFi_Check

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WiFi_Check

Purpose: Script checks to see if WiFi has a network IP and if not restart WiFi

Control the ACT led to indicate status

Uses a lock file which prevents the script from running more than one at a time. If lockfile is old, it removes it

For more info:
http://rpi.tnet.com/project/scripts/wifi_check


Create and install a deb

cd wifi-monitor_1.0.0-1
dpkg-buildpackage -uc -b
sudo apt install ../wifi-monitor_1.0.0-1_all.deb

Alternative, less brainiac installation

rm -rf wifi-monitor_1.0.0-1/debian
dpkg-deb --build wifi-monitor_1.0.0-1
sudo apt install ./wifi-monitor_1.0.0-1.deb

Delete the package

sudo apt purge wifi-monitor

View logs from the script

journalctl -ft wifi-check
journalctl -ft wifi-led

View logs from the service(s)

journalctl -efu 'wifi-*'

Test the script

... if the service is not running. And make sure to be locked back in. Ideally run in a tmux.

sudo ip link set wlan0 down; sleep 10; sudo ./wifi-check; sleep 2; sudo ip link set wlan0 up

About

Checks WiFi network Connection and Restarts it if is down

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 99.4%
  • Makefile 0.6%