Created
March 18, 2014 01:19
-
-
Save inertia186/9611817 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| ## A small wrapper around the mcrcon binary. | |
| ## | |
| ## See: https://forums.bukkit.org/threads/admin-rcon-mcrcon-remote-connection-client-for-minecraft-servers.70910/ | |
| MC="/path/to/server" | |
| RCON_EXEC="$MC/scripts/gits/mcrcon-code/mcrcon" | |
| RCON_HOST="127.0.0.1" | |
| RCON_PORT=25577 | |
| RCON_PASS=password | |
| if [ -z "$1" ]; then | |
| # Interactive usage. | |
| $RCON_EXEC -c -H $RCON_HOST -P $RCON_PORT -p $RCON_PASS -t | |
| else | |
| # Send a single command and return the response. | |
| cmd="$@" | |
| $RCON_EXEC -c -H $RCON_HOST -P $RCON_PORT -p $RCON_PASS "$cmd" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment