Screen Minecraft Server Daemon

Discussion in 'Systems Administration' started by DotRar, Jun 5, 2016.

  1. For making a screen and running a command use:
    screen -d -m -t NAMEOFSCREEN './home/mc/example1/start.sh'

    To run a command on startup, if it's ubuntu or Debian you could just do:

    crontab -e

    and on a new line add:
    @reboot screen -d -m -t NAMEOFSCREEN './home/mc/example1/start.sh'
     
    • Informative Informative x 1
  2. Thanks!
     
  3. What I did was creating 1 script so it executes: @reboot /startall.sh
    And start all has:
    screen -dmS SCREEN bash -c 'cd MC SERVER;./start.sh'
     
    • Informative Informative x 1
  4. Yeah that would probably be more efficent, will give that a go
     
    • Like Like x 1