# General Ping function to check general pingability
function check_ping(){
declare -a ipstoping=("1.1.1.1""8.8.8.8""9.9.9.9")
for ip in "${ipstoping[@]}";do
ping -q -c 3 -w 5"$ip"
if[$? -ne 0];then
log_to_file "Healthcheck: Couldn't ping $ip for 5 seconds... Gave up!"
log_to_file "Please check your internet connection or firewall rules to fix this error, because a simple ping test should always go through from the unbound container!"
return1
fi
done
log_to_file "Healthcheck: Ping Checks WORKING properly!"
return0
}
# General DNS Resolve Check against Unbound Resolver himself
function check_dns(){
declare -a domains=("mailcow.email""github.com""hub.docker.com")