Skip to content

Commit

Permalink
Add Debian support to installation script
Browse files Browse the repository at this point in the history
  • Loading branch information
muratugureminoglu committed Nov 19, 2024
1 parent 32bd936 commit efd717c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions install_ant-media-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ distro () {
$SUDO apt-get update && $SUDO apt-get install coreutils
CUSTOM_JVM=$DEFAULT_JAVA
fi
elif [ "$ID" == "ubuntu" ] || [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "almalinux" ] || [ "$ID" == "rhel" ]; then
elif [ "$ID" == "ubuntu" ] || [ "$ID" == "centos" ] || [ "$ID" == "rocky" ] || [ "$ID" == "almalinux" ] || [ "$ID" == "rhel" ] || [ "$ID" == "debian" ]; then
if [ "$VERSION_ID" == "18.04" ] && [ "aarch64" == $ARCH ]; then
echo -e "ARM architecture is supported on Ubuntu 20.04. For 18.04 installation, use the link below to install.\nhttps://github.com/ant-media/Ant-Media-Server/wiki/Frequently-Asked-Questions#how-can-i-install-the-ant-media-server-on-ubuntu-1804-with-arm64"
exit 1
fi

if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]]; then
if [[ $VERSION_ID != 18.04 ]] && [[ $VERSION_ID != 20.04 ]] && [[ $VERSION_ID != 22.04 ]] && [[ $VERSION_ID != 24.04 ]] && [[ $VERSION_ID != 8* ]] && [[ $VERSION_ID != 9* ]] && [[ $VERSION_ID != 12 ]]; then
echo $msg
exit 1
fi
Expand Down Expand Up @@ -262,7 +262,7 @@ if [ "$UPDATE" == "true" ]; then
fi

if [ -z "$ANT_MEDIA_SERVER_ZIP_FILE" ]; then
if [ "$ID" == "ubuntu" ]; then
if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then
#Added curl package for the minimal OS installations.
$SUDO apt-get update
$SUDO apt-get install jq curl -y
Expand Down Expand Up @@ -312,7 +312,7 @@ fi

REQUIRED_VERSION="2.6"

if [ "$ID" == "ubuntu" ]; then
if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then
$SUDO apt-get update -y
$SUDO apt-get install unzip zip libva-drm2 libva-x11-2 libvdpau-dev -y
$SUDO unzip -o $ANT_MEDIA_SERVER_ZIP_FILE "ant-media-server/ant-media-server.jar" -d /tmp/
Expand Down Expand Up @@ -359,7 +359,7 @@ check


if [[ $VERSION == 2.1\.+.* || $VERSION == 2.0* || $VERSION == 1.* ]]; then
if [ "$ID" == "ubuntu" ]; then
if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then
$SUDO apt-get install openjdk-8-jre -y
$SUDO apt purge openjfx libopenjfx-java libopenjfx-jni -y
$SUDO apt install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2 -y
Expand All @@ -377,14 +377,14 @@ if [[ $VERSION == 2.1\.+.* || $VERSION == 2.0* || $VERSION == 1.* ]]; then

elif [[ $VERSION == 2.4* || $VERSION == 2.3* || $VERSION == 2.2* ]]; then

if [ "$ID" == "ubuntu" ]; then
if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then
$SUDO apt-get update -y
$SUDO apt-get install openjdk-11-jdk -y
check
fi

elif [[ $VERSION == 2.5* || $VERSION == 2.6* || $VERSION == 2.7* ]]; then
if [ "$ID" == "ubuntu" ]; then
if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then
$SUDO apt-get update -y
$SUDO apt-get install openjdk-11-jre-headless -y
check
Expand All @@ -400,7 +400,7 @@ elif [[ $VERSION == 2.5* || $VERSION == 2.6* || $VERSION == 2.7* ]]; then

else
# with 2.8 we start to use java17
if [ "$ID" == "ubuntu" ]; then
if [[ "$ID" == "ubuntu" || "$ID" == "debian" ]]; then
$SUDO apt-get update -y
$SUDO apt-get install openjdk-17-jre-headless -y
check
Expand Down

0 comments on commit efd717c

Please sign in to comment.