Skip to content

Commit

Permalink
Remove the operating system version check
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-antonyuk authored and agolybev committed Nov 27, 2024
1 parent 25a72d7 commit 23eae24
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 33 deletions.
8 changes: 0 additions & 8 deletions install/OneClickInstall/install-RedHat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ RES_QUESTIONS="In case you have any questions contact us via http://support.only
RES_MARIADB="To continue the installation, you need to remove MariaDB"
INSTALL_FLUENT_BIT="true"

res_unsupported_version () {
RES_CHOICE="Please, enter Y or N"
RES_CHOICE_INSTALLATION="Continue installation [Y/N]? "
RES_UNSPPORTED_VERSION="You have an unsupported version of $DIST installed"
RES_SELECT_INSTALLATION="Select 'N' to cancel the ONLYOFFICE installation (recommended). Select 'Y' to continue installing ONLYOFFICE"
RES_ERROR_REMINDER="Please note, that if you continue with the installation, there may be errors"
}

while [ "$1" != "" ]; do
case $1 in

Expand Down
10 changes: 0 additions & 10 deletions install/OneClickInstall/install-RedHat/install-preq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@ ${package_manager} -y install yum-utils
{ yum check-update postgresql; PSQLExitCode=$?; } || true #Checking for postgresql update
{ yum check-update $DIST*-release; exitCode=$?; } || true #Checking for distribution update

UPDATE_AVAILABLE_CODE=100
if [[ $exitCode -eq $UPDATE_AVAILABLE_CODE ]]; then
res_unsupported_version
echo $RES_UNSPPORTED_VERSION
echo $RES_SELECT_INSTALLATION
echo $RES_ERROR_REMINDER
echo $RES_QUESTIONS
read_unsupported_installation
fi

if rpm -qa | grep mariadb.*config >/dev/null 2>&1; then
echo $RES_MARIADB && exit 0
fi
Expand Down
16 changes: 1 addition & 15 deletions install/OneClickInstall/install-RedHat/tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,7 @@ if [ "$SKIP_HARDWARE_CHECK" != "true" ]; then
check_hardware
fi

read_unsupported_installation () {
read -p "$RES_CHOICE_INSTALLATION " CHOICE_INSTALLATION
case "$CHOICE_INSTALLATION" in
y|Y ) yum -y install $DIST*-release
;;

n|N ) exit 0;
;;

* ) echo $RES_CHOICE;
read_unsupported_installation
;;
esac
}

UPDATE_AVAILABLE_CODE=100
DIST=$(rpm -qa --queryformat '%{NAME}\n' | grep -E 'centos-release|redhat-release|fedora-release' | awk -F '-' '{print $1}' | head -n 1)
DIST=${DIST:-$(awk -F= '/^ID=/ {gsub(/"/, "", $2); print tolower($2)}' /etc/os-release)};
[[ "$DIST" =~ ^(centos|redhat|fedora)$ ]] || DIST="centos"
Expand Down

0 comments on commit 23eae24

Please sign in to comment.