BuildTools 11 months ago
parent
commit
5950abf942
2 changed files with 12 additions and 3 deletions
  1. 1 1
      build_cube.sh
  2. 11 2
      options/minecraft.sh

+ 1 - 1
build_cube.sh

@@ -92,7 +92,7 @@ sudo apt-get update
 echo -e ""
 sudo apt-get install lxde lxde-icon-theme -y
 echo -e ""
-sudo apt-get install  samba cifs-utils mdadm git build-essential libtool pkg-config automake autoconf ethtool net-tools openvpn filezilla \
+sudo apt-get install samba cifs-utils mdadm git build-essential libtool pkg-config automake autoconf ethtool net-tools openvpn filezilla \
 tasksel lzma-dev lzma cmake libuv1-dev libssl-dev msr-tools tightvncserver lm-sensors openssh-server xfsprogs -y
 echo -e ""
 sudo apt-get install zstd pixz pbzip2 pigz btrfs-progs gparted gpart gnome-remote-desktop libcanberra-gtk-module \

+ 11 - 2
options/minecraft.sh

@@ -1,4 +1,5 @@
 #!/bin/bash
+ScriptLoc=$(readlink -f "$0")
 recover_backup=YES
 backup_file="/Cloud/Backup/Minecraft/Minecraft_ubuntu.tar.xz"
 
@@ -119,6 +120,8 @@ fi
 echo -e
 }
 export TERM=xterm-256color
+if [ ! -f /home/wareck/.mcr ]
+then
 print_centered "$(tput setaf 10)"
 print_centered " ⠀⠀⡰⠉⠉⣷⡄⣀⣎⠉⢹⡎⠉⢉⡞⠉⠉⣧⡎⠉⠉⡞⠉⠉⠉⠉⠉⣿⠉⠉⠉⠉⠉⢹⡏⠋⠉⠉⠉⠙⡏⠉⣉⠉⣉⠉⢿⠉⠉⠉⢉⠉⢱⡏⠉⠉⠉⢉⠉⡄"
 print_centered "⠀⢀⠃⠀⠀⠘⠛⠁⠀⠀⣼⠀⠀⣸⠃⠀⠀⠘⠃⠀⢰⡇⠀⠀⠛⠛⠛⣿⠀⠀⢸⣿⣿⣿⡇⠀⠈⠃⠀⣠⣿⠀⠉⣶⣍⠀⢸⡆⠀⠘⠛⠛⠛⣿⣿⡆⠀⠈⡟⠁"
@@ -126,9 +129,11 @@ print_centered "⠀⡜⣀⢀⣶⣀⣰⠆⠀⢀⡏⠀⠀⣿⠀⠀⣸⣄⠤⠄⢸
 print_centered "⢰⠀⠀⢸⣿⣦⠈⠀⠀⢼⠁⠀⢰⡇⠀⠀⣿⣿⠀⠀⢼⠀⡄⠀⠀⠀⠀⣿⠀⠀⠀⠀⠀⢸⡇⠂⠀⣿⠀⠀⢸⡆⠀⢘⡧⠀⠀⣿⠀⠀⢸⠛⠃⠘⣿⣿⡇⠀⠀⡆"
 print_centered "⠀⠑⢤⣀⣙⡿⠉⠱⣄⣠⣷⣄⣀⣹⣄⣀⣘⡏⢆⣀⣘⣧⣀⣀⣀⣀⣀⣿⣀⣀⣀⣀⣀⣸⣇⣀⣰⣏⣀⣠⣿⣀⣀⣾⣁⣀⣴⣋⣀⡠⠃⠀⠀⠀⢿⣋⣀⡤⠋⠀"
 print_centered "$(tput sgr0)"
-print_centered "Minecraft Ubuntu Server Builder/install v2.2"
+print_centered "Minecraft Ubuntu Server Builder/install v3.0.0"
 print_centered "$(tput sgr0)"
+touch /home/wareck/.mcr
 sleep 2
+fi
 
 echo -e "$(tput setaf 10)Installation java:$(tput setaf 7)"
 if ! [ -x "$(command -v java)" ]
@@ -173,7 +178,9 @@ then
 echo -e "$(tput setaf 6)Java version $version =>> OK$(tput sgr0)"
 else
 echo "erreur ! désinstaller java d'abord !"
-exit 1
+sudo apt-get remove openjdk-8-jre-headless -y
+sudo apt-get remove openjdk-11-jre-headless -y
+exec "$ScriptLoc"
 fi
 
 echo -e "\n$(tput setaf 10)Download/install mcrcon:$(tput sgr0)"
@@ -240,6 +247,7 @@ recovery
 
 function server_config {
 echo -e "\nDone"
+if [ -f /tmp/sp ]; then rm /tmp/sp ;fi
 cat <<'EOF'>> /tmp/sp
 #Minecraft server properties
 #Sat Dec 30 04:15:00 CET 2023
@@ -311,4 +319,5 @@ cp /tmp/sp /home/wareck/Minecraft/server.properties
 }
 
 server_config
+if [ -f /home/wareck/.mcr ] ; then rm /home/wareck/.mcr;fi
 echo "Done"