1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Run start.sh non-interactive

Discussion in 'Help' started by Yorkshirebeef, Mar 23, 2017.

  1. Yorkshirebeef

    Yorkshirebeef Creeper

    Messages:
    2
    Hi

    I've installed the latest version of pmmp in a little linux vm (latest lubuntu), and I can start the server using the supplied start.sh and it runs quite happily. I was just wondering if it would be possible to run it unattended, ie run it as a linux service? If that is possible how would I connect to it if I wanted to stop it? Happy to write a script and then share it, just need some pointers :)

    Thanks,
    Mark
     
  2. Envite

    Envite Creeper

    Messages:
    2
    Easy way:
    Install 'screen'
    Run it
    On the "new" shell inside 'screen', run ./start.sh
    Detach from 'screen' with sequence Ctrl-A Ctrl-D
    Pocketmine will continue running inside the detached terminal as if it were truly attended. If you want to connect to it again, just run 'screen' again and reattach with sequence Ctrl-A Ctrl-R
     
    Primus likes this.
  3. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    you should also try tmux it's more actively developed then screen
     
    applqpak likes this.
  4. TheDiamondYT

    TheDiamondYT Zombie

    Messages:
    298
    GitHub:
    TheDiamondYT1
    Tmux is so easy to use.
     
  5. Yorkshirebeef

    Yorkshirebeef Creeper

    Messages:
    2
    Thanks all - I'll take a look at screen and Tmux. Presumably its not possible to run it through a linux service so it starts with the server?
     
  6. Thunder33345

    Thunder33345 Moderator Staff Member

    Messages:
    2,137
    GitHub:
    Thunder33345
    i dont know if linux have a autostart like windows
    worth checking corntab but i dont think you can trigger something on start
     
  7. Envite

    Envite Creeper

    Messages:
    2
    Yes, Linux can start it as a service (of course ;)). I just posted the "easy way", not needing to be root on the computer not fiddling any configuration.
     
  8. TheDiamondYT

    TheDiamondYT Zombie

    Messages:
    298
    GitHub:
    TheDiamondYT1
    It doesnt but you have to edit
    Try putting a script in /etc/init.d/ that starts tmux
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.