#!/bin/ bash # Checkt die wichtigsten Systeme im Netzwerk. # (c) 2003-2007 nikolaus hammler # Licensed under GNU GPL # Deadline # ping beendet nach dieser Anzahl von Sekunden, egal, wieviel gesendet wurde w=10 # Stop after sending count ECHO_REQUEST packets. With deadline option, ping waits for count ECHO_REPLY packets, until the timeout # expires. c=4 # Send ECHO_REQUEST all 0.5s i=0.2 # Teil im nobaqnet if ping -w $w -c $c -i $i 192.168.200.120 >/dev/null 2>&1 then echo "Elsa Router ist OK" else echo "ACHTUNG! Elsa Router ist nicht erreichbar!" exit 1 fi if ping -w $w -c $c -i $i 195.185.185.195 >/dev/null 2>&1 then echo "Internet Verbindung ist OK" else echo "ACHTUNG! Internet ist nicht erreichbar!" exit 1 fi if ping -w $w -c $c -i $i www.google.at >/dev/null 2>&1 then echo "DNS System ist OK" else echo "ACHTUNG! DNS System geht nicht!" exit 1 fi if ping -w $w -c $c -i $i pylon.intra.nobaq.net >/dev/null 2>&1 then echo "Pylon ist OK" else echo "ACHTUNG! Plyon ist nicht erreichbar!" exit 1 fi if ping -w $w -c $c -i $i ap-hammler.intern.stiftingtal.net >/dev/null 2>&1 then echo "AP Hammler ist OK" else echo "ACHTUNG! AP Hammler ist nicht erreichbar" exit 1 fi if ping -w $w -c $c -i $i ianus.intern.stiftingtal.net >/dev/null 2>&1 then echo "janus ist OK" else echo "ACHTUNG! janus ist nicht erreichbar!" exit 1 fi if ping -w $w -c $c -i $i balrog.intern.stiftingtal.net >/dev/null 2>&1 then echo "Balrog ist OK" else echo "ACHTUNG! Balrog ist nicht erreichbar!" exit 1 fi if ssh -l niki ianus.intern.stiftingtal.net -i /var/lib/asterisk/asterisk@nobaq.ppk "ping -w $w -c $c -i $i 195.185.185.195 >/dev/null 2>&1" >/dev/null 2>&1 then echo "Internet ist OK" else echo "ACHTUNG! Internet ist nicht erreichbar!" exit 1 fi if ssh -l niki ianus.intern.stiftingtal.net -i /var/lib/asterisk/asterisk@nobaq.ppk "ping -w $w -c $c -i $i www.google.at >/dev/null 2>&1" >/dev/null 2>&1 then echo "DNS ist OK" else echo "ACHTUNG! DNS System geht am janus geht nicht!" exit 1 fi exit 0