Update MC Readme, add Squad-Stop-Server.bash

This commit is contained in:
Price Hiller 2021-08-04 00:48:34 -05:00
parent ae36b33938
commit bf811c226d
2 changed files with 22 additions and 2 deletions

View File

@ -43,8 +43,8 @@ server directory/backups. e.g. `~/Minecraft/Server-1/backups/`
- Corresponds with the server in ~/Minecraft where the ID is the number in the directory name
- `-r` | `--rcon-ignore`
- This flag will ensure that Minecraft's rcon password is not overwritten by the script
- `-j` | `--jar`
- Path to a minecraft server jar and the server will install that jar to the given ID
- `-i` | `--install`
- Takes in a spigot revision or just "latest", see https://www.spigotmc.org/wiki/buildtools/ for revisions
## Minecraft-Connect-Server
Used to connect to a running Minecraft server's console to see log output or kill the server with ^C (control + c)

View File

@ -0,0 +1,20 @@
#!/bin/bash
set -e
usage() {
echo \
"Help Menu
Usage: $(basename "${0}") <server id>"
exit "${1}"
}
[[ -z "${1}" ]] && usage 1
[[ "${1}" == "--help" || "${1}" == "-h" ]] && usage 0
tmux send-keys -t "Squad-Server-${1}" "C-c" ENTER > /dev/null 2>&1 \
&& echo "Stopped Squad-Server-${1}" \
|| echo "Could not find Squad-Server-${1}"
exit ${?}