Skip to content

Commit

Permalink
Update apache-tomcat.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tekadesukant authored Jan 29, 2025
1 parent b4cea03 commit c7c6e13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apache-tomcat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ else
exit 1
fi

sudo yum install wget -y
sudo yum install wget -y || sudo apt-get update -y; sudo apt install wget -y

# Fetch supported Java version for the current Tomcat version
RELEASE_NOTES_URL="https://archive.apache.org/dist/tomcat/tomcat-$MAJOR_VERSION/v$TOMCAT_VERSION/RELEASE-NOTES"
Expand Down Expand Up @@ -70,10 +70,10 @@ elif [ "$OS" = "rhel" ] || [ "$OS" = "centos" ]; then
exit 1
fi
log "Installed Java $SUPPORTED_JAVA successfully."
elif [ "$OS" = "ubuntu" ]; then
elif [ "$OS" = "ubuntu" ] || [ "$OS" = "debian" ]; then
log "Ubuntu detected. Updating package lists..."
sudo apt update
sudo apt-get update
sudo apt-get upgrade
log "Installing Java Development Kit..."
sudo add-apt-repository ppa:openjdk-r/ppa -y
sudo apt install openjdk-$SUPPORTED_JAVA-jdk -y
Expand Down

0 comments on commit c7c6e13

Please sign in to comment.