diff --git a/healthcheck.sh b/healthcheck.sh index c736d81e..4f384e84 100644 --- a/healthcheck.sh +++ b/healthcheck.sh @@ -1,9 +1,6 @@ #!/bin/sh -ping -W 1 -w 1 -q -s 8 1.1.1.1 &> /dev/null -status=$? -if [ $status = 0 ]; then - exit 0 -fi -printf "Pinging 1.1.1.1 resulted in error status code $status" +out="$(ping -W 3 -c 1 -q -s 8 1.1.1.1)" +[ $? != 0 ] || exit 0 +printf "$out" exit 1 \ No newline at end of file