-
-
Save smcclosr/eb05a0597b7712cf2c38a7d490c0b0b5 to your computer and use it in GitHub Desktop.
Downloads, installs and configures components required for the MineOS Web User Interface on apt-get based systems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# Bulding this fork for Turknkey 17.1 | |
# Minecraft now needs Java 17 starting with 1.19 so default will not do anymore | |
# update repositories | |
# curl -sL https://deb.nodesource.com/setup_10.x | bash - | |
curl -sL https://deb.nodesource.com/setup_18.x | bash - | |
apt-get update | |
# download the necessary prerequisite components for mineos | |
apt-get -y install nodejs supervisor git rdiff-backup screen build-essential openjdk-17-jre-headless npm | |
# download the most recent mineos web-ui files from github | |
mkdir -p /usr/games | |
cd /usr/games | |
git clone https://github.com/hexparrot/mineos-node.git minecraft | |
cd minecraft | |
git config core.filemode false | |
chmod +x service.js mineos_console.js generate-sslcert.sh webui.js | |
ln -s /usr/games/minecraft/mineos_console.js /usr/local/bin/mineos | |
cp mineos.conf /etc/mineos.conf | |
npm install --unsafe-perm | |
# distribute service related files | |
cp init/supervisor_conf /etc/supervisor/conf.d/mineos.conf | |
# generate self-signed certificate | |
./generate-sslcert.sh | |
# start the background service | |
supervisorctl reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated for OpenJDK 17, which is now required for Minecraft 1.19