altes wiki durchsortiert zum veröffentlichen

This commit is contained in:
amanita 2017-06-15 13:20:32 +02:00
commit 57b6e0e2d3
92 changed files with 4949 additions and 0 deletions

20
technikzeugs/scripts/ping.sh Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
HOSTS="10.9.8.10"
COUNT=120
DOWN=0
for myHost in $HOSTS
do
count=$(ping -c $COUNT $myHost | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')
if [ $count -eq 0 ]; then
if [ $DOWN -eq 0 ]; then
echo "sol ($myHost) is down at $(date)" | mail -s "sol down" mail@reudnetz.org
DOWN=1
fi
else
if [ $DOWN -eq 1 ]; then
echo "sol ($myHost) is up again at $(date)" | mail -s "sol recovered" mail@reudnetz.org
DOWN=0
fi
fi
done