Skip to content

Instantly share code, notes, and snippets.

@lazerl0rd
Created October 9, 2023 23:01
Show Gist options
  • Save lazerl0rd/5a37870dc6cf03342fdb9e7d860f0ea1 to your computer and use it in GitHub Desktop.
Save lazerl0rd/5a37870dc6cf03342fdb9e7d860f0ea1 to your computer and use it in GitHub Desktop.
#! /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