aboutsummarylogtreecommitdiffstats
path: root/minecraftd.sh
diff options
context:
space:
mode:
authorGordian Edenhofer2016-06-09 23:49:19 +0200
committerGordian Edenhofer2016-06-09 23:49:19 +0200
commitbd28300b3e65e6f505e3d8f0a8fb8cfdb9c0aa0a (patch)
treeed8205d4c8ead7545696599f0bff5f338b3f65f5 /minecraftd.sh
parentd68ac105b3b5ece846bde3fbe0e461a9d693e6d7 (diff)
downloadaur-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-xminecraftd.sh2
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