diff options
author | Gordian Edenhofer | 2021-06-17 19:57:29 +0200 |
---|---|---|
committer | Gordian Edenhofer | 2021-06-17 19:58:50 +0200 |
commit | 4dcfad43bdb37ec4ccd6dfed896a81d1e61288ff (patch) | |
tree | 5d21bf60956edafd767717ecea2a9500331a3e1a /papermc.sh | |
parent | 51232fa7d9d80245da35126764cb3caf6b4e3ecd (diff) | |
download | aur-4dcfad43bdb37ec4ccd6dfed896a81d1e61288ff.tar.gz |
upgpkg: minecraft-server 1.17-1
More aggressively close the netcat instance in idle_server_daemon as to
not stall on dead connections.
upgpkg: cuberite 1.12.2c0_4e48464-1
upgpkg: cuberite-bin 1.12.2b241-1
upgpkg: papermc 1.16.5+b778-1
upgpkg: spigot 1.17+b128-1
Diffstat (limited to 'papermc.sh')
-rwxr-xr-x | papermc.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/papermc.sh b/papermc.sh index f62aa2702d95..e4e7ed485025 100755 --- a/papermc.sh +++ b/papermc.sh @@ -140,7 +140,8 @@ idle_server_daemon() { no_player=$(( IDLE_IF_TIME - 300 )) # Game server is down, listen on port ${GAME_PORT} for incoming connections echo -n "Netcat: " - ${NETCAT_CMD} -v -l -p ${GAME_PORT} && echo "Netcat caught an connection. The server is coming up again..." + ${NETCAT_CMD} -v -l -p ${GAME_PORT} 2>&1 | (grep -m1 -i "connect" && pkill -P $$ ${NETCAT_CMD}) || true + echo "Netcat caught a connection. The server is coming up again..." IDLE_SERVER="false" ${myname} start fi else @@ -152,7 +153,8 @@ idle_server_daemon() { no_player=$(( IDLE_IF_TIME - 300 )) # Game server is down, listen on port ${GAME_PORT} for incoming connections echo -n "Netcat: " - ${NETCAT_CMD} -v -l -p ${GAME_PORT} && echo "Netcat caught an connection. The server is coming up again..." + ${NETCAT_CMD} -v -l -p ${GAME_PORT} 2>&1 | (grep -m1 -i "connect" && pkill -P $$ ${NETCAT_CMD}) || true + echo "Netcat caught a connection. The server is coming up again..." IDLE_SERVER="false" ${myname} start fi done |