aboutsummarylogtreecommitdiffstats
path: root/minecraftd.sh
diff options
context:
space:
mode:
authorGordian Edenhofer2016-12-29 14:04:41 +0100
committerGordian Edenhofer2016-12-29 14:04:41 +0100
commitd39462710d3eb0f8eeb38f28bd88f8310ef7c40b (patch)
tree8a1a0f693e3c00656f7d50a762141e5873bee00a /minecraftd.sh
parenta11e065f9f786fff7434442243ce501a4fee80ba (diff)
downloadaur-d39462710d3eb0f8eeb38f28bd88f8310ef7c40b.tar.gz
upgpkg: minecraft-server 1.11.2-1
Tweak proceeding sed command instead of piping to awk.
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 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