migrate to custom RCON client

This commit is contained in:
2026-09-06 12:05:08 -05:00
parent ffc7ca5271
commit a763f221d4
5 changed files with 24 additions and 22 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
#!/bin/bash
exec /usr/bin/mc-rcon/mcrcon -p "$(
exec /usr/bin/wircon.pyz -H localhost -p "$(
grep '^rcon.password=' /minecraft_data/server.properties | cut -d= -f2-
)" "$@"
+2 -1
View File
@@ -24,12 +24,13 @@ if ! test -f /minecraft_data/eula.txt; then
cp /defaults/eula.txt /minecraft_data/eula.txt
fi
export MCRCON_PASS=$(grep "^rcon.password=" /minecraft_data/server.properties | cut -d '=' -f 2- | head -n 1)
# shutdown process
function shutdown {
echo "stopping Minecraft server..."
/usr/bin/mc-rcon/mcrcon -p ${MCRCON_PASS} -w 5 "say Server is restarting!" save-all stop
/usr/bin/wircon.pyz -H localhost -p ${MCRCON_PASS} -E /usr/bin/restart.py
wait $SERVER_PID
}