Skip to content
/ netwatch Public

A Lua script that watches your network and restarts it when it doesn't work. Linux only.

Notifications You must be signed in to change notification settings

slice/netwatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

netwatch

netwatch watches your network using nmcli (networkmanager) and restarts it if something goes wrong.

how it works

nw opens a ping process, and monitors the time it takes to ping your ping address (default: 8.8.8.8). it also detects if the network is unreachable.

if the network becomes to slow or the network becomes unreachable, it is revived.

network revival

  1. network is restarted
  2. wait until connectivity to the network
  3. wait for internet connection (using ping)
  4. restrt ping, monitor your network

compiling

prerequisites

  • lua 5.3 (untested with other versions)
  • luarocks
  • moonscript
  • luasocket (sleep)

use moonscript to compile nw.moon

notification support

notify-send will be used to send you notifications when your network is being revived or it has been revived. you will only see these notifications if your notification daemon is running.

About

A Lua script that watches your network and restarts it when it doesn't work. Linux only.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published