Ahtenus/minecraft-init — Issue #44: Using the init script to manage multiple servers on a single machine
Author: Remanent
Created: 2012-02-18 17:34:17+00:00
State: open

I have been using your script to run a single server on a single machine, and i wanted to use a second copy of the script (mc1 and mc2 for this example) so that i could have a test server running in conjunction with the live server, that i can test plugins on, etc, without having to affect the main server.

the issue i've run into is if i'm running the script (mc2) for the main server, mc1 sees it online even though i've defined everything different in the config files for the servers.

server 1's config1 file
```MC_JAR="minecraft_server.jar"
CB_JAR="craftbukkit_server.jar"
SERVICE=$CB_JAR
CB_RELEASE="stable"
SCREEN="mctest"
USERNAME="v"
MCPATH="/home/${USERNAME}/minecraft/server1"
CPU_COUNT=1
INITMEM="2048M"
MAXMEM="2048M"
INVOCATION="java -Xmx$MAXMEM -Xms$INITMEM -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=$CPU_COUNT -XX:+AggressiveOpts -jar $SERVICE nogui"
BACKUPPATH="/home/${USERNAME}/minecraft/minebak"
LOGPATH="/home/${USERNAME}/minecraft/logs/server1"
WHOLEBACKUP="/home/${USERNAME}/minecraft/serverbak/server1"
WORLDSTORAGE="${MCPATH}/worldstorage"
BACKUPFORMAT="tar"
RAMDISK="/dev/shm"```

Server 2 config2 file
```MC_JAR="minecraft_server.jar"
CB_JAR="craftbukkit_server.jar"
SERVICE=$CB_JAR
CB_RELEASE="stable"
SCREEN="mctest"
USERNAME="mclinux"
MCPATH="/home/${USERNAME}/minecraft/server2"
CPU_COUNT=1
INITMEM="2048M"
MAXMEM="2048M"
INVOCATION="java -Xmx$MAXMEM -Xms$INITMEM -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=$CPU_COUNT -XX:+AggressiveOpts -jar $SERVICE nogui"
BACKUPPATH="/home/${USERNAME}/minecraft/minebak"
LOGPATH="/home/${USERNAME}/minecraft/logs/server2"
WHOLEBACKUP="/home/${USERNAME}/minecraft/serverbak/server2"
WORLDSTORAGE="${MCPATH}/worldstorage"
BACKUPFORMAT="tar"
RAMDISK="/dev/shm"```