Skip to content

Commit

Permalink
- Added Support for Debian 12
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Apr 14, 2024
1 parent ab47768 commit f8e73df
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Thats why I created this All-in-One solution for installing a Minecraft Server (
## Supported Distros
- Debian 10
- Debian 11
- Debian 12
- Ubuntu 18.04
- Ubuntu 20.04
- Ubuntu 22.04
Expand Down
21 changes: 20 additions & 1 deletion mcserver_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,8 @@ function check_java8 {
if [[ $ubuntu = true ]]
then
DIR="/usr/lib/jvm/java-8-openjdk-amd64"
elif [[ $deb12 = true ]]
DIR="/usr/lib/jvm/temurin-8-jdk-amd64/bin/java"
else
DIR="/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/"
fi
Expand Down Expand Up @@ -310,6 +312,13 @@ function install_java8 {
if [[ $ubuntu == "true" ]]
then
sudo apt-get install openjdk-8-jdk -y
elif [[ $deb12 == "true" ]]
then
mkdir -p /etc/apt/keyrings
wget -O - https://packages.adoptium.net/artifactory/api/gpg/key/public | tee /etc/apt/keyrings/adoptium.asc
echo "deb [signed-by=/etc/apt/keyrings/adoptium.asc] https://packages.adoptium.net/artifactory/deb $(awk -F= '/^VERSION_CODENAME/{print$2}' /etc/os-release) main" | tee /etc/apt/sources.list.d/adoptium.list
apt update
apt install temurin-8-jdk -y
else
apt install apt-transport-https ca-certificates wget dirmngr gnupg software-properties-common -y
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | apt-key add -
Expand Down Expand Up @@ -3090,7 +3099,12 @@ function installer_routine {
touch .installed
clear
apt install dialog python3 python3-pip wget screen sudo jq -y
if [[ $deb12 == "true" ]]
then
apt install python3-packaging -y
else
pip3 install packaging
fi

}

Expand Down Expand Up @@ -3156,8 +3170,13 @@ distro_check () {
then
if [[ ! $current_version == "11"* ]]
then
if [[ $current_version == "12"* ]]
then
deb12=true
else
echo "Your Linux Distribution is not supported."
exit
fi
fi
fi
fi
Expand All @@ -3166,7 +3185,7 @@ distro_check () {
}

## Script Version
scriptversion="8.8"
scriptversion="9.0"
##

## Latest Version
Expand Down

0 comments on commit f8e73df

Please sign in to comment.