Created
October 9, 2023 23:01
-
-
Save lzlrd/5a37870dc6cf03342fdb9e7d860f0ea1 to your computer and use it in GitHub Desktop.
This file contains 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
#! /usr/bin/env bash | |
if [ $# -eq 0 ]; then | |
/usr/bin/mcrcon -H 172.16.0.18 -P "$(cat "/srv/minecraft/server.properties" | grep "rcon.port" | awk -F "=" '{print $2}')" -p "$(cat "/srv/minecraft/server.properties" | grep "rcon.password" | awk -F "=" '{print $2}')" | |
else | |
/usr/bin/mcrcon "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment