Tyleo-Scripts/irp-mineos

40 lines
1.4 KiB
Text
Raw Permalink Normal View History

2024-02-18 18:06:30 +00:00
#!/usr/bin/env bash
# MineOS Installer Script (default mode)
if ! command -v dpkg &> /dev/null
then
echo "Systéme non DEB - Lancement annulé"
echo "Ce script ne fonctionne correctement"
echo "que sur Debian 11 et Ubuntu 20+"
echo "https://tyleodev.fr/scripts-crees-par-tyleo/"
exit
fi
echo -------------------------------------------------------------
curl https://static.tyleodev.fr/astra/banner-deb
echo Version 2.1 - Script de Déploiement MineOS pour Debian
apt -y install curl
curl -sL https://deb.nodesource.com/setup_14.x | bash -
apt -y install nodejs
wget https://github.com/AdoptOpenJDK/openjdk16-binaries/releases/download/jdk-16.0.1%2B9/OpenJDK16U-jre_x64_linux_hotspot_16.0.1_9.tar.gz -O openjdk-16-jre.tgz
tar xf openjdk-16-jre.tgz
mv jdk-16.0.* /opt/openjdk-16.0-jre
ln -s /opt/openjdk-16.0-jre/bin/java /usr/bin/java
rm openjdk-16-jre.tgz
apt -y install git rdiff-backup screen
apt -y install build-essential
cd /usr/games
git clone https://github.com/hexparrot/mineos-node minecraft
cd minecraft
git config core.filemode false
chmod +x generate-sslcert.sh mineos_console.js webui.js
cp mineos.conf /etc/mineos.conf
cd /usr/games/minecraft
npm install
cd /usr/games/minecraft
./generate-sslcert.sh
cp /usr/games/minecraft/init/systemd_conf /etc/systemd/system/mineos.service
systemctl enable mineos
apt install -y supervisord
cp /usr/games/minecraft/init/supervisor_conf /etc/supervisor/conf.d/mineos.conf
supervisorctl reload