diff --git a/healthcheck.sh b/healthcheck.sh index 2d9cb21..750fc53 100755 --- a/healthcheck.sh +++ b/healthcheck.sh @@ -1,8 +1,12 @@ #!/bin/bash +if [ -z "${PUBLIC_IP}" ]; then + PUBLIC_IP="$(curl -s https://ifconfig.me/ip)" +fi + if curl https://api.steampowered.com/ISteamApps/GetServersAtAddress/v1?addr=${PUBLIC_IP} -qq | grep Space -q then exit 0 else exit 1 -fi \ No newline at end of file +fi