Skip to content

Commit

Permalink
Fix syntax issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mekya committed Nov 15, 2023
1 parent d15ff94 commit aca4858
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion install_ant-media-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -349,11 +349,13 @@ if [[ $VERSION == 2.1* || $VERSION == 2.0* || $VERSION == 1.* ]]; then
$SUDO sed -i '/Environment=JAVA_HOME="\/usr\/lib\/jvm\/java-11-openjdk-amd64"/c\Environment=JAVA_HOME="\/usr\/lib\/jvm\/java-8-openjdk-amd64"' $AMS_BASE/antmedia

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

if [ "$ID" == "ubuntu" ]; 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.0* ]]; then
if [ "$ID" == "ubuntu" ]; then
$SUDO apt-get update -y
Expand All @@ -368,7 +370,9 @@ elif [[ $VERSION == 2.5* || $VERSION == 2.6* || $VERSION == 2.7.0* ]]; then
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
echo "JAVA_HOME : $JAVA_HOME"
find /usr/lib/jvm/ -maxdepth 1 -type d -iname "java-11*" | head -1 | xargs -i update-alternatives --set java {}/bin/java

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

0 comments on commit aca4858

Please sign in to comment.