Skip to content

Instantly share code, notes, and snippets.

@hexparrot
Last active June 18, 2022 14:44
Show Gist options
  • Save hexparrot/1a7a2881d6c951d693d6 to your computer and use it in GitHub Desktop.
Save hexparrot/1a7a2881d6c951d693d6 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
# 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
# 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
@manuee
Copy link

manuee commented Apr 5, 2016

On my fork I added a check for the script to be ran as root or fail gracefully - have a look =)

@JamesDAdams
Copy link

does not work anymore

@GeneralBones
Copy link

Yes it does.

@necro367
Copy link

necro367 commented Jul 8, 2019

cant install supervisor. any fix?

@aBoredDev
Copy link

Forked and added npm to the packages to be installed, because it isn't being installed for some reason, and added @manuee 's check for root or fail gracefully. Check it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment