Check 0.0.0.0 instead of play.kaboom.pw

This caused me a LOT of trouble in my server, it was getting killed for no reason and I didn't know why. And then I realized it.
This commit is contained in:
Luna 2021-11-13 16:43:54 -03:00 committed by GitHub
parent 10fd2df3c3
commit 1ddb5eb839
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,7 +11,7 @@ while true; do
# If server doesn't respond to ping, or if the log file is older than
# 3 minutes, kill the server
if [ "$(env printf '\xFE' | nc -w 15 play.kaboom.pw 25565 | wc -m)" -eq 0 ]; then
if [ "$(env printf '\xFE' | nc -w 15 0.0.0.0 25565 | wc -m)" -eq 0 ]; then
pkill -9 java
echo $(date) >> ~/kill.log
fi