![]() ![]() ![]() minecraft folder is the directory that Minecraft uses to store game data such as player inventory, worlds, and also your mods. Method 3: Through the Minecraft Game Menu.If you ever decide to delete the server, you can remove the "command" by editing ~/.bash_aliases and removing the single line that contains it. Running the command I added above is just a slight convenience, so you don't need to worry about adding the script to PATH or else having to either calculate the relative path or type the full path every time you want to start your server. This can be done with: MC_CMD='alias start_srvr="/usr/lib/jvm/java-11-openjdk-amd64/bin/java -javaagent:log4jfix/Log4jPatcher-1.0.0.jar -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -Xmx5000M -Xms4000M -jar forge-1.16.5-36.2.2.jar nogui"' & echo "$" > ~/.bashrc The easiest way to set it up (which will save time in the long run) is to add an alias for the command on last line, which actually configures and starts the server file. So after the first time it is run, It will only ever execute the top and bottom lines. All it does is ask you have read, and if you accept, its terms, but only if you have not already been asked and answered yes. Take notice of the url for the EULA in the script. I also realized that when I initially created the ftb user and gave it ownership of the folder that I didn't give it permission of the subfolders, so it was denied permission to start the server. Then I used systemctl enable and systemctl start to enable and start the server. The file contains the following: ĮxecStart=/usr/bin/screen -DmS mc-%i bash start.shĮxecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 15 SECONDS."\015'ĮxecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 10 SECONDS."\015'ĮxecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "say SERVER SHUTTING DOWN IN 5 SECONDS."\015'ĮxecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "save-all"\015'ĮxecStop=/usr/bin/screen -p 0 -S mc-%i -X eval 'stuff "stop"\015' I created a file called at the location /etc/systemd/system/. I am also using a different version of JDK to run the server file so I changed the start.sh file to this: #!/bin/bashĮcho "Do you agree to the Mojang EULA available at ?" service file look like? I know it has to be placed in /etc/systemd/system/, but I don't know how to write the file that would make the ftb user open it's own virtual terminal or whatever to be able to save the world and then stop the server.įTB Academy 1.16 Server Files Download Site Used: I selected the Linux download option then ran the install file to automatically download the server files. Upon stopping the server I wish for it to save and then close the server. How do I make a system service file so I can use commands such as systemctl status rvice, systemctl start rvice, and systemctl stop rvice. In the server folder, there is a start.sh file to start the server. I installed a modded FTB server to my Ubuntu Server, created a user and group called "ftb", and gave it its own directory /opt/ftb/ that contains a folder with the server files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |