I run a simple minecraft server. I made a script awhile ago for Ubuntu that would automatically create a Gnu screen and start said server. I decided get a new server with Debian instead. Now for some reason, the script will not work and I have no idea why!
sleep 5 screen -dmS mc sleep 1 screen -p 0 -S mc -X stuff "cd /home/server/Desktop/ServerSoftware/Minecraft/modpacks^AgrarianSkiesHQ^3_1_1^AgrarianSkiesHQServer" sleep 1 screen -p 0 -S mc -X eval "stuff \015" sleep 1 screen -p 0 -S mc -X stuff ./ServerStart.sh sleep 1 screen -p 0 -S mc -X eval "stuff \015"
How it's supposed to work:
- Start a minimized GNU-Screen
- Change Directory to the minecraft server directory
- Start the server
Basically how it doesn't work is that it WILL create the screen and be detached from it. But after that, when I resume the screen I have to CTRL+c to be able to input anything. the "cd" command never gets sent through, nor the ./StartServer.sh
The "^" in the CD line are supposed to be there. I have tested the command in terminal and it works as wanted.