Update MC Readme, add Squad-Stop-Server.bash
This commit is contained in:
parent
ae36b33938
commit
bf811c226d
@ -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
|
- Corresponds with the server in ~/Minecraft where the ID is the number in the directory name
|
||||||
- `-r` | `--rcon-ignore`
|
- `-r` | `--rcon-ignore`
|
||||||
- This flag will ensure that Minecraft's rcon password is not overwritten by the script
|
- This flag will ensure that Minecraft's rcon password is not overwritten by the script
|
||||||
- `-j` | `--jar`
|
- `-i` | `--install`
|
||||||
- Path to a minecraft server jar and the server will install that jar to the given ID
|
- Takes in a spigot revision or just "latest", see https://www.spigotmc.org/wiki/buildtools/ for revisions
|
||||||
|
|
||||||
## Minecraft-Connect-Server
|
## 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)
|
Used to connect to a running Minecraft server's console to see log output or kill the server with ^C (control + c)
|
||||||
|
20
CentOS/Squad/Squad-Stop-Server.bash
Executable file
20
CentOS/Squad/Squad-Stop-Server.bash
Executable 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 ${?}
|
Loading…
Reference in New Issue
Block a user