From a46d58d5d1c16fb76f19e103d022609b01e8b66e Mon Sep 17 00:00:00 2001 From: edvind Date: Fri, 17 Oct 2014 02:34:17 +0200 Subject: [PATCH 1/3] removed unnecessary apt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When replacing $OVPATH in the config with nothing it runs the system installed minecraft overviewer. More logical than putting ”apt” there to get it to work. --- minecraft | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/minecraft b/minecraft index 27cb68d..28bac2f 100755 --- a/minecraft +++ b/minecraft @@ -536,12 +536,12 @@ change_ramdisk_state() { overviewer_start() { if [ ! -e $OVPATH/overviewer.py ] then - if [ ! "$OVPATH" == "apt" ] + if [ ! "$OVPATH" == "" ] then echo "Minecraft-Overviewer is not installed in \"$OVPATH\"" exit 1 else - echo "Using APT repository installed Minecraft-Overviewer" + echo "Using existing Minecraft-Overviewer." fi fi if [ ! -e $OUTPUTMAP ] @@ -551,7 +551,7 @@ overviewer_start() { if [ -e $OVCONFIGPATH/$OVCONFIGNAME ] then echo "Start generating map with Minecraft-Overviewer..." - if [ "$OVPATH" == "apt" ] + if [ "$OVPATH" == "" ] then as_user "overviewer.py --config=$OVCONFIGPATH/$OVCONFIGNAME" else From e67cf13e92976f203063035f20679717144fa248 Mon Sep 17 00:00:00 2001 From: edvind Date: Tue, 21 Oct 2014 02:06:30 +0200 Subject: [PATCH 2/3] Small fixes Deleted unnecessary spaces, changed vanilla server to default config and default screen name to minecraft_screen. --- config.example | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/config.example b/config.example index 54962b8..ee35500 100644 --- a/config.example +++ b/config.example @@ -10,22 +10,22 @@ # Name of vanilla server jar (no need to change if you're running craftbukkit and vice versa) MC_JAR="minecraft_server.jar" -# Name of craftbukkit jar +# Name of craftbukkit jar CB_JAR="craftbukkit.jar" # Define the release of CraftBukkit to use (stable or unstable) CB_RELEASE="stable" # Name of server.jar to use (either $MC_JAR or $CB_JAR) -SERVICE=$CB_JAR +SERVICE=$MC_JAR # Name to use for the screen instance -SCREEN="server_screen" +SCREEN="minecraft_screen" # User that should run the server USERNAME="minecraft" -# Path to minecraft server directory +# Path to minecraft server directory MCPATH="/home/${USERNAME}/minecraft" # Path to server log file ($MCPATH/server.log on older versions) @@ -61,7 +61,7 @@ BACKUPPATH="/home/${USERNAME}/mcbackup/worlds" WHOLEBACKUP="/home/${USERNAME}/mcbackup/server" # Format for world backup (tar or zip). -BACKUPFORMAT="tar" +BACKUPFORMAT="tar" # Normally backups will be put in a subfolder to $BACKUPPATH with todays date # and the backups themselves will have a timestamp. From a6c45fb4ef2449a3990926838cfb0095bddd738f Mon Sep 17 00:00:00 2001 From: edvind Date: Tue, 21 Oct 2014 02:07:21 +0200 Subject: [PATCH 3/3] whoami MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Deleted $ME variable since it’s only used once. --- minecraft | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/minecraft b/minecraft index 28bac2f..8368c5b 100755 --- a/minecraft +++ b/minecraft @@ -36,9 +36,8 @@ then exit fi -ME=`whoami` as_user() { - if [ $ME == $USERNAME ] ; then + if [ "$(whoami)" == "$USERNAME" ] ; then bash -c "$1" else su $USERNAME -s /bin/bash -c "$1"