Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removed unnecessary apt #171

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions config.example
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.
Expand Down
9 changes: 4 additions & 5 deletions minecraft
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -536,12 +535,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 ]
Expand All @@ -551,7 +550,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
Expand Down