Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am trying to make a startup script for my Minecraft severs but I can't figure out how to: If the session "Server1" exists, run a command in it, if it doesn't, create the session and then run the command.

I have read something about a -dRR switch but haven't been able to use it.

The script is java -Xmx 128M spigot.jar -o true BTW.

EDIT: This is te command I've been using (can only run it once otherwise it will create news seesions) screen -dmS Server3 bash -c '/home/server/Minecraft/BungeeCord/Server3/start.sh; exec bash' The start.sh file contains the above code.

Of course I tried to change the switch from -dmS to -dRR, but that didn't work.

share|improve this question
1  
welcome to Stack Exchange! this is not a free help desk. we're happy to help, of course, but please show what you have tried. for example, what screen command have you tried? what do you mean when you say you can't use the -dRR switch? –  strugee Feb 9 at 22:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.