diff options
author | Gordian Edenhofer | 2016-06-09 23:49:19 +0200 |
---|---|---|
committer | Gordian Edenhofer | 2016-06-09 23:49:19 +0200 |
commit | bd28300b3e65e6f505e3d8f0a8fb8cfdb9c0aa0a (patch) | |
tree | ed8205d4c8ead7545696599f0bff5f338b3f65f5 /minecraftd.sh | |
parent | d68ac105b3b5ece846bde3fbe0e461a9d693e6d7 (diff) | |
download | aur-bd28300b3e65e6f505e3d8f0a8fb8cfdb9c0aa0a.tar.gz |
upgpkg: minecraft-server 1.10-2
Fix false greater than comparison if checking for active players.
Diffstat (limited to 'minecraftd.sh')
-rwxr-xr-x | minecraftd.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/minecraftd.sh b/minecraftd.sh index 9503a30a1521..90c1ec55456a 100755 --- a/minecraftd.sh +++ b/minecraftd.sh @@ -76,7 +76,7 @@ is_player_online() { if [[ -z $(tail -n 1 "${LOGPATH}/latest.log" | sed -r -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' -e 's/.*\: //' | tr -d '\n') ]]; then # No player is online return 0; - elif [[ $(tail -n 10 "${LOGPATH}/latest.log" | grep "There are" | sed -r -e '$!d' -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' -e 's/.*\: //' -e 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/' | tr -d '\n') -gt 0 ]]; then + elif [[ $(tail -n 10 "${LOGPATH}/latest.log" | grep "There are" | sed -r -e '$!d' -e 's/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g' -e 's/.*\: //' -e 's/^([^.]+).*$/\1/; s/^[^0-9]*([0-9]+).*$/\1/' | tr -d '\n') -eq 0 ]]; then # No player is online return 0; else |