From 417de1d5c40d0cf39aedced584e0e9b34fcebdd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Sch=C3=B6dl?= Date: Wed, 5 Mar 2025 08:01:00 +0000 Subject: [PATCH] =?UTF-8?q?check=5Finet.sh=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- check_inet.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 check_inet.sh diff --git a/check_inet.sh b/check_inet.sh new file mode 100644 index 0000000..3bc0bcd --- /dev/null +++ b/check_inet.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +ping -c4 www.google.com +let a=$? +if [ "$a" != "0" ]; then + /sbin/shutdown -r +1 Connection lost, rebooting... +fi + +# ToDo afterwards +# make executable +# chmod +x check_inet.sh + +# add in crontab +# */30 * * * * /home/yourname/check_inet.sh