Scripting Assistance for Minecraft Server

Nerumph

Distinguished
Apr 15, 2014
227
0
18,760
Hello all!

I have come to you all with a bit of a rookie question about a startup script for my new FTB Infinity Evolved server I have recently set up; mainly to do some troubleshooting on what I have done and how I can perfect it!

Now getting this server up in the first place was not an easy task to say the least for someone that had never set any game server up before, but this startup script has been driving me even more mad than the server itself.

I am currently running the server on a Ubuntu 14.04 Distro on a Dell r710 virtualized server unit (one of two I have in my home atm). So far, I have been able to get the following script to actually launch the ServerStart.sh script from the main FTB folder:

Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides: mcinfinity
# Required-Start: $ALL
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: FTB Infinity Evolved Server One
#
### END INIT INFO

USER=""
FTB=/usr/local/Minecraft/Servers/FTBServers/FTBInfinityEvolved
SCRIPT=ServerStart.sh

#Start Server Here
cd $FTB
screen -m -d -S "infinity" sh ServerStart.sh

This works great until I shut down my SSH connection to my server; and the server instance closes out. I quickly worked out that this is due to the fact that, for some reason, the screen instance is not properly being created for some reason... as in, not at all.

I would also really love to be able to access the screen to input admin commands if at all possible as well.

Sooo... What am I doing wrong here to cause screen to not create an instance of the server? I would really love to get this working soon; I hope you all can help a novice programmer out here!

Sincerely,

Nerumph