Skip to content

Instantly share code, notes, and snippets.

@aBoredDev
Forked from hexparrot/install_mineos-node
Last active March 9, 2020 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aBoredDev/f8018b514669957687cc1d4702a9b16e to your computer and use it in GitHub Desktop.
Save aBoredDev/f8018b514669957687cc1d4702a9b16e 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.
#!/bin/sh
# checks for root or exits gracefully - thanks @manuee
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# update repositories
curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get update
# download the necessary prerequisite components for mineos
apt-get -y install nodejs supervisor git rdiff-backup screen build-essential default-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
# 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