I've just created a bash script that should start my 3 Minecraft servers all at once. But it only starts the first server (proxy), the others simply won't start… Can someone help me?
echo "Starting Proxy"
screen -dmS Proxy java -jar Server-Network / Proxy / Bungee * .jar
echo "Waiting 10 Seconds"
sleep 10
echo "Starting Lobby"
screen -dmS lobby java -jar server network / lobby / spigot.jar
echo "Waiting 30 Seconds"
sleep 30
echo "Starting CB1"
screen -dmS CB1 java -jar server network / CB1 / spigot.jar
echo "Waiting 30 Seconds"
sleep 30
if screen -list | grep "proxy"; then
echo "Server Proxy is online"
else
echo "Server failed to start"
fi
if screen -list | grep "lobby"; then
echo "Server lobby is online"
else
echo "Server failed to start"
fi
if screen -list | grep "CB1"; then
echo "Server CB1 is online"
else
echo "Server failed to start"
fi
You get behind
screen… Jar
that & have forgotten. This means that this command is processed in the background. As soon as it is started, the next command echo… Processed. The terminates automatically and then sleep is executed…
Doesn't that actually make "-dmS" for the screen command
I haven't dealt with screen that far.
I'll just try, thank you in advance.
Unfortunately it still doesn't work, but thank you anyway for your help
I haven't read in the manual that it then runs in the background.
Why do you even use screen?
I start my programs via a runlevel script.
With Debian maybe /etc/init.d/rc.local
(unfortunately I can't check, I use openSuSE)
I use screen so that i can easily access the server consoles at any time