Last active
June 11, 2017 12:38
-
-
Save SupaHam/b3269bc7d28700e5deb0 to your computer and use it in GitHub Desktop.
Mark2 convenient commands
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
task.players=1 | |
task.servers=1 | |
task.users=1 | |
theme=supa | |
theme.supa.console= dark magenta, default | |
theme.supa.head= light gray, default | |
theme.supa.output= light gray, default | |
theme.supa.mark2= dark red, default | |
theme.supa.server= light magenta, default | |
theme.supa.server-current= dark green, default | |
theme.supa.user= dark magenta, default | |
theme.supa.user-attached= dark green, default | |
theme.supa.stats= dark magenta, default | |
# players | |
theme.supa.menu= dark magenta, default | |
theme.supa.menu-item= light magenta, default | |
theme.supa.menu-item-focus= dark green, default |
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
# see resources/mark2.default.properties for details | |
mark2.jar-path=/home/minecraft/jars/spigot-stable.jar | |
mark2.shutdown-timeout=20 | |
java.cli.X.ms=256M | |
java.cli.X.mx=3G | |
java.cli.D.jline.terminal=jline.UnixTerminal | |
plugin.monitor.enabled=false | |
plugin.shutdown.kick-command= | |
plugin.shutdown.kick-mode=once | |
plugin.save.warn-message= | |
plugin.save.message= |
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
#!/bin/sh | |
# Constants | |
HOME_DIR="/home/minecraft/" | |
BUILDS_DIR="$HOME_DIR/builds" | |
OLD_DIR=`pwd` | |
cd $BUILDS_DIR | |
java -jar AeviumTools.jar | |
$HOME_DIR/copyLatestJar.sh |
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
CMD="$1" | |
if [ -z $CMD ]; then | |
echo "Please specify $0 enable or $0 disable" | |
exit 1 | |
fi | |
CMD="${CMD,,}" | |
case "$CMD" in | |
"enable") | |
sed -i "/online-mode=/ s/=.*/=false/" server.properties | |
sed -i '/bungeecord/s/false/true/' spigot.yml | |
echo "Bungeecord enabled, online-mode deactivated" | |
;; | |
"disable") | |
sed -i "/online-mode=/ s/=.*/=true/" server.properties | |
sed -i '/bungeecord/s/true/false/' spigot.yml | |
echo "Bungeecord disabled, online-mode activated" | |
;; | |
*) exit 1 | |
esac |
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
### | |
### BungeeCord mark2 options | |
### | |
# Jar File Name | |
mark2.jar-path=BungeeCord*.jar | |
### | |
### mark2 services | |
### | |
# Ping: Disable for BungeeCord | |
mark2.service.ping.enabled=false | |
# Process: Basic bungee detection settings to initialize the mark2 plugin system. | |
# done-pattern=.*Listening on.* is the only way to get mark2 to release the console. :( | |
mark2.service.process.done-pattern=.*Listening on.* | |
mark2.service.process.stop-cmd=end\n | |
### | |
### JVM options | |
### | |
# Memory allocation pool initial size | |
java.cli.X.ms=64M | |
# Memory allocation pool max size | |
java.cli.X.mx=256M | |
plugin.backup.enabled=false | |
plugin.save.enabled=false | |
### | |
# SHUTDOWN | |
# Cleanly stop/restart the server | |
plugin.shutdown.enabled=true | |
plugin.shutdown.stop-warn-message=Network going down for planned maintenance in {delay}. | |
plugin.shutdown.stop-message=Network Going Down for Maintenance. | |
plugin.shutdown.stop-cancel-message=Planned Network Maintenance Cancelled. | |
plugin.shutdown.stop-cancel-reason=Planned Network Maintenance Cancelled ({reason}). | |
plugin.shutdown.restart-warn-message=Planned Network Restart in {delay}. | |
plugin.shutdown.restart-message=Network Restarting. | |
plugin.shutdown.restart-cancel-message=Planned Network Restart Cancelled. | |
plugin.shutdown.restart-cancel-reason=Planned Network Restart Cancelled ({reason}). | |
plugin.trigger.enabled=false |
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
#!/bin/sh | |
# Constants | |
HOME_DIR="/home/minecraft/" | |
TOOLS_DIR="$HOME_DIR/builds" | |
BUILD_DIR="$TOOLS_DIR/AeviumSpigot/AeviumSpigot-Server/target" | |
OUTPUT_DIR="$HOME_DIR/jars" | |
find $BUILD_DIR -name "spigot-*-SNAPSHOT.jar" -exec cp {} $OUTPUT_DIR/spigot-latest.jar \; |
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
#!/bin/sh | |
echo "Fixing minecraft permissions..." | |
chown -R minecraft:mcadmin /home/minecraft | |
chmod -R g+rw /home/minecraft |
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
#!/bin/sh | |
mark2 attach |
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
#!/bin/bash | |
# Command usage: mcattach [server] | |
# if the server isn't provided `mark2 attach` is executed | |
# if the server is provided `mark2 attach -n server` is executed | |
# | |
# I find this script useful because sometimes when you stop a server and attempt to | |
# attach again it throws a stacktrace and you have to sudo. | |
if [ $# -eq "1" ]; then | |
SERVER="-n $1" | |
fi | |
sudo -u minecraft mark2 attach $SERVER |
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
#!/bin/bash | |
# Command usage: mcrestart <server> [countdown] | |
# This is the default countdown which is 15 seconds. | |
COUNTDOWN="15s" | |
if [ $# -gt "0" ]; then | |
if [ $# -eq 1 ]; then | |
echo "No countdown specified... defaulting to $COUNTDOWN" | |
else | |
COUNTDOWN=$2 | |
fi | |
else | |
echo -e "\033[33;31mNo server specified" | |
exit 1 | |
fi | |
echo "Restarting $1 in $COUNTDOWN" | |
if [ $USER == "minecraft" ]; then | |
mark2 send -n $1 ~restart $COUNTDOWN | |
else | |
sudo -u minecraft mark2 send -n $1 ~restart $COUNTDOWN | |
fi |
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
#!/bin/bash | |
# Command usage: mcstart <server> | |
if [ $# -eq "0" ]; then | |
echo -e "\033[33;31mNo server specified" | |
exit 1 | |
fi | |
echo -e "\033[33;33mStarting server $1...\033[0m" | |
if [ $USER == "minecraft" ]; then | |
mark2 start /home/minecraft/servers/$1 | |
else | |
sudo -u minecraft mark2 start /home/minecraft/servers/$1 | |
fi |
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
#!/bin/bash | |
# Command usage: mcstop <server> | |
if [ $# -eq "0" ]; then | |
echo -e "\033[33;31mNo server specified" | |
exit 1 | |
fi | |
echo -e "\033[33;33mStopping server $1...\033[0m" | |
if [ $USER == "minecraft" ]; then | |
mark2 send -n $1 stop | |
else | |
sudo -u minecraft mark2 send -n $1 stop | |
fi |
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
# Unique jar | |
#mark2.jar-path=/home/minecraft/jars/spigot*.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment