Add more checl-scripts

This commit is contained in:
2017-02-21 01:19:22 +01:00
parent ad7a77eb5a
commit a97dd2781e
12 changed files with 687 additions and 0 deletions

20
check_dns.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
alternate_addr="oopen.de google.com heise.de debian.org ubuntu.com"
for ip_addr in $alternate_addr ; do
ping -c3 $ip_addr >/dev/null 2> /dev/null
if [ $? -eq 0 ]; then
exit 0
fi
done;
/etc/init.d/bind9 restart
echo ""
echo "[ Info ]: Restartet Nameservice bind on host `hostname --long` at `date +\"%d.%m.%Y %H:%M:%S\"`"
echo ""
exit 0;