It will then also proceed to download the current release of server.jar and move your existing copy to the backups directory as server_0.jar. On the first run, the script will initialise itself by creating a current_ver.txt file and a backups directory if they are not found. It runs perfectly as well! Some points to note Then just run the script./update_server.shįun fact: I’ve just tested this script on my iPad Pro using the iSH terminal app. Then set the permissions for the script file to be executable. Just download and move the update_server.sh to the same directory where your Minecraft server.jar file is located. If you’ve not already downloaded the script, get it here at this link: Using the Minecraft update_server.sh script I should not need to tell you how to do it. Otherwise, just use the apt, yum or apk package manager on your OS and install them. brew install jq wgetĪs for linux users, most of probably already have both jq and wget. Once installed, run the follwing command to install both wget and jq. Instructions on installing Homebrew can be found at at this link. jq – a nifty JSON query utility to read values from a JSON file.įor macOS users, I recommend using Homebrew to install both wget and jq if you don’t already have them.wget – a great utility to download files for a URL.I’ve also assumed that wget and jq is already installed on your desktop or notebook. However, the commands used are not specific to macOS and therefore should work on Linux OS as well. I’ve written this Minecraft server update script on my macOS Catalina, and thus have tested it to work on macOS. As the default shell is now on zsh, I figured that I should try and write my own script from scratch and see how different zsh was from bash.Īnd thus this script ( link) here that I’ve uploaded to my git lab repository here. I run the Minecraft server on my MacBook that’s currently running on macOS Catalina. Scripting the update_server.sh script on macOS Catalina The combination both of these json files makes it possible to programmatically download the latest release of Minecraft’s server.jar using a script. The version’s json file instead is where you would find the download URL. While this json file does not contain the direct download URLs of the binaries, it provides the url with all the details of each of the versions. As I was looking for an easier way to download and update the Minecraft server.jar, I stumbled upon some scripts that pointed me to this version_manifest.json file that contains all the available versions of Minecraft.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |