aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorubuntuperonista <30541016+ubuntuperonista@users.noreply.github.com>2023-03-02 17:51:17 -0300
committerGitHub <noreply@github.com>2023-03-02 17:51:17 -0300
commit6c6707f5498367977f49d92ec8393b102d473672 (patch)
tree6bc89804276340012dbc19e1371c388ebc9ed919
parentc9975c15edb7808d5bea4969c8cb63abcdc78ed7 (diff)
downloadopenwrt_scripts-6c6707f5498367977f49d92ec8393b102d473672.tar.gz
Create pingreset.sh
-rw-r--r--pingreset.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/pingreset.sh b/pingreset.sh
new file mode 100644
index 0000000..97c2473
--- /dev/null
+++ b/pingreset.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Programa para probar la conexion o resetear.
+if ping -c 1 google.com > /dev/null ; then
+echo "Todo OK, el cliente funciona y no necesita reiniciarse"
+pingfail=0
+else
+ pingfail=$(($pingfail+1))
+echo $pingfail " ping fracasados"
+if [ $pingfail -gt 10 ];
+then
+echo "mas de 10 ping a google fracasados. RESETEANDO EL ROUTER!!"
+reboot
+fi
+fi
Un proyecto texto-plano.xyz