improved connection detection
This commit is contained in:
2
ServerStart.sh.template
Executable file → Normal file
2
ServerStart.sh.template
Executable file → Normal file
@ -17,7 +17,7 @@ while true; do
|
||||
echo "0" > /home/minecraft/scripts/lp_shutdown
|
||||
mcconn=0
|
||||
until [ $mcconn -ne 0 ]; do
|
||||
mcconn=$(nc -l 25500 | cat -v | grep -cF '^@cM-^\^B')
|
||||
mcconn=$(nc -l 25500 | cat -v | grep -czP '(\^X\^@M-r\^E\^Q)([\w\.]+)(\^@FML2\^@cM-\^\\\^B\n\^@\^H)([\w\.]+)')
|
||||
if [ $mcconn -eq 0 ]; then
|
||||
echo "Something connected, but it doesn't look like a minecraft connection"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user