#!/bin/bash

# WildlifeSystems
#
# This script is part of the WildlifeSystems project. For further information
# please refer to https://docs.wildlife.systems, or for more information on
# the project itself, please refer to https://wildlife.systems.

if [[ -z "$1" ]]; then
	echo "Error: No host specified."
	exit 1
fi

ping -c1 "$1" > /dev/null 2>&1
while [[ $? != 0 ]];
do
	sleep 1
	ping -c1 "$1" > /dev/null 2>&1
done

exit 0
