diff options
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 a9cdeb5c555a..8f65fd41ff30 100755 --- a/minecraftd.sh +++ b/minecraftd.sh @@ -113,7 +113,7 @@ idle_server_daemon() { screen -S "${SESSION_NAME}" -Q select . > /dev/null if [[ $? -eq 0 ]]; then # Game server is up and running - if [[ "$(screen -S "${SESSION_NAME}" -ls | sed -n 2p | awk '{ print $2 }')" == "(Attached)" ]]; then + if [[ "$(screen -S "${SESSION_NAME}" -ls | sed -n "s/.*${SESSION_NAME}\s\+//gp")" == "(Attached)" ]]; then # An administrator is connected to the console, pause player checking echo "An admin is connected to the console. Pause player checking." # Check for active player |