Add more checl-scripts
This commit is contained in:
20
check_dns.sh
Executable file
20
check_dns.sh
Executable 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;
|
||||
Reference in New Issue
Block a user