Quick reference until or unless mcrcon adds support for this behavior automatically

MCRCON_PASS="$(sed -n -e 's/^rcon\.password=\(.\+\)/\1/p' < server.properties)" mcrcon

Alternatively, a bash alias:

alias mcrcon='env MCRCON_PASS="${MCRCON_PASS:=$(sed -n -e '\''s/^rcon\.password=\(.\+\)/\1/p'\'' < server.properties)}" mcrcon'

Leave a Reply

Your email address will not be published. Required fields are marked *

Warning: This site uses Akismet to filter spam. Until or unless I can find a suitable replacement anti-spam solution, this means that (per their indemnification document) all commenters' IP addresses will be sent to Automattic, Inc., who may choose to share such with 3rd parties.
If this is unacceptable to you, I highly recommend using an anonymous proxy or public Wi-Fi connection when commenting.