diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-01-10 16:08:04 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-01-10 16:08:04 +0200 |
commit | 0d03db771b48f7d90cf96560c32048001809e84f (patch) | |
tree | 0dd2afc2fef804df1e501c60000d0d08e1773e50 /keepalive | |
parent | 9fdf74a1b44f76a3749ae4111472647d79cf3f6a (diff) | |
download | extrautils-0d03db771b48f7d90cf96560c32048001809e84f.tar.gz |
Add: a bunch of new scripts
Diffstat (limited to 'keepalive')
-rwxr-xr-x | keepalive | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/keepalive b/keepalive new file mode 100755 index 0000000..f264d26 --- /dev/null +++ b/keepalive @@ -0,0 +1,17 @@ +#!/bin/sh + +set -eu + +while true +do + if ping -c1 -t100 8.8.8.8 > /dev/null 2>&1 + then + sleep 5 + else + echo "No networking. Turning networking off and back on again. $(date)" + nmcli networking off + sleep 2 + nmcli networking on + sleep 20 + fi +done |