Run a command at start up that uses screen.
Hey LQ,
I'm trying to make my new vps launch a minecraft server when the vm boots. I know this is probably pretty straight forward, but I want to run the minecraft server from a new screen, so that I can reattach to it when ssh into it later. Normally I do screen -S "mc-server" and this gives me a new screen with a prompt. then I do java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui then I do ctrl+a+d to exit the screen and then log out of putty. Any tips in the right direction would be swell. thank you. |
Put this in your crontab
Quote:
|
tmux
You can also do it in tmux in a similar manner:
Code:
@reboot tmux new-session -ds mc-server 'java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui' Code:
tmux attach -t mc-server |
All times are GMT -5. The time now is 12:48 PM. |