xartin

minecraft-server.sh

Feb 25th, 2020
1,858
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. !#/bin/sh
  2.  
  3. /usr/bin/java -Xms512M -Xmx1008M -jar /path/to/minecaft-server/minecraft-server.jar nogui
  4.  
  5. To set the crontab to run this at system boot create the above as minecraft-server.sh
  6.  
  7. to add the crontab entry for the desired NON ROOT user that will run the minecraft server type crontab -e while logged into that user session. I repeat DO NOT use root user to run the minecraft server or baby yoda will eat your soul.
  8.  
  9. add the following text to create the crontab entry that willl start the system service at every reboot
  10.  
  11. @reboot /path/to/minecraft-server.sh
  12.  
  13. save the crontab entry. done. your minecraft server will start automagically every system reboot
Add Comment
Please, Sign In to add comment