Minor bug fixes (#361)

This commit is contained in:
Evgeniy Antonyuk 2021-09-30 17:41:11 +03:00 committed by GitHub
parent dbc174e955
commit 43a8959f74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 47 deletions

View File

@ -83,31 +83,7 @@ elif [ "$APPSERVER_NEED_UPDATE" = "true" ]; then
MYSQL_SERVER_PORT=$(echo $USER_CONNECTIONSTRING | grep -oP 'Port=\K.*' | grep -o '^[^;]*')
MYSQL_SERVER_PASS=$(echo $USER_CONNECTIONSTRING | grep -oP 'Password=\K.*' | grep -o '^[^;]*')
expect << EOF || true
set timeout -1
log_user 1
spawn apt-get install -y --only-upgrade ${product} elasticsearch=${ELASTIC_VERSION}
expect {
"*** elasticsearch.yml (Y/I/N/O/D/Z)" {
send "\025Y\r"
expect {
"*** jvm.options (Y/I/N/O/D/Z)" {
send "\025Y\r"
}
"/etc/elasticsearch/elasticsearch.yml" {}
}
}
"*** jvm.options (Y/I/N/O/D/Z)" {
send "\025Y\r"
}
}
expect eof
EOF
apt-get install -o DPkg::options::="--force-confnew" -y --only-upgrade ${product} elasticsearch=${ELASTIC_VERSION}
fi
if [ "${APPSERVER_INSTALLED}" = "false" ] || [ "${APPSERVER_NEED_UPDATE}" = "true" ]; then

View File

@ -38,7 +38,7 @@ locale-gen en_US.UTF-8
# add elasticsearch repo
ELASTIC_VERSION="7.13.1"
ELASTIC_DIST=$(echo $ELASTIC_VERSION | awk '{ print int($1) }')
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
curl https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
echo "deb https://artifacts.elastic.co/packages/${ELASTIC_DIST}.x/apt stable main" | tee /etc/apt/sources.list.d/elastic-${ELASTIC_DIST}.x.list
# add nodejs repo
@ -49,7 +49,7 @@ curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
#add dotnet repo
wget https://packages.microsoft.com/config/$DIST/$REV/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
curl https://packages.microsoft.com/config/$DIST/$REV/packages-microsoft-prod.deb -O
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
@ -61,7 +61,7 @@ if [ "$(ls -A "$PRODUCT_DIR/services/kafka" 2> /dev/null)" == "" ]; then
adduser --quiet --home ${PRODUCT_DIR}/services/kafka --system kafka
fi
cd ${PRODUCT_DIR}/services/kafka
wget https://downloads.apache.org/kafka/2.7.0/kafka_2.13-2.7.0.tgz
curl https://downloads.apache.org/kafka/2.7.1/kafka_2.13-2.7.1.tgz -O
tar xzf kafka_*.tgz --strip 1 && rm -rf kafka_*.tgz
chown -R kafka ${PRODUCT_DIR}/services/kafka
cd -
@ -121,21 +121,6 @@ if ! dpkg -l | grep -q "mysql-server"; then
echo mysql-server-8.0 mysql-server/root_password_again password ${MYSQL_SERVER_PASS} | debconf-set-selections
apt-get -y update
elif dpkg -l | grep -q "mysql-server"; then
expect << EOF || true
set timeout -1
log_user 1
spawn apt-get install -y --only-upgrade mysql-server mysql-client
expect "*** mysqld.cnf (Y/I/N/O/D/Z)"
send "\025N\r"
expect eof
EOF
fi
# add redis repo
@ -144,7 +129,7 @@ if [ "$DIST" = "ubuntu" ]; then
fi
#add nginx repo
wget http://nginx.org/keys/nginx_signing.key
curl http://nginx.org/keys/nginx_signing.key -O
apt-key add nginx_signing.key
echo "deb [arch=$ARCH] http://nginx.org/packages/$DIST $DISTRIB_CODENAME nginx" | tee /etc/apt/sources.list.d/nginx.list
rm nginx_signing.key
@ -153,7 +138,7 @@ rm nginx_signing.key
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
# install
apt-get install -yq wget \
apt-get install -o DPkg::options::="--force-confnew" -yq \
expect \
nano \
nodejs \

View File

@ -12,6 +12,7 @@ RES_APP_CHECK_PORTS="uses ports"
RES_CHECK_PORTS="please, make sure that the ports are free.";
RES_INSTALL_SUCCESS="Thank you for installing ONLYOFFICE ${product^^}.";
RES_QUESTIONS="In case you have any questions contact us via http://support.onlyoffice.com or visit our forum at http://dev.onlyoffice.org"
RES_MARIADB="To continue the installation, you need to remove MariaDB"
res_unsupported_version () {
RES_CHOICE="Please, enter Y or N"

View File

@ -40,6 +40,7 @@ read_unsupported_installation () {
esac
}
{ 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
@ -52,6 +53,10 @@ if [[ $exitCode -eq $UPDATE_AVAILABLE_CODE ]]; then
read_unsupported_installation
fi
if rpm -qa | grep mariadb.*config >/dev/null 2>&1; then
echo $RES_MARIADB && exit 0
fi
# add epel repo
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-$REV.noarch.rpm || true
rpm -ivh https://rpms.remirepo.net/enterprise/remi-release-$REV.rpm || true
@ -99,7 +104,7 @@ if [ "$(ls -A "$PRODUCT_DIR/services/kafka" 2> /dev/null)" == "" ]; then
mkdir -p ${PRODUCT_DIR}/services/
getent passwd kafka >/dev/null || useradd -m -d ${PRODUCT_DIR}/services/kafka -s /sbin/nologin -p kafka kafka
cd ${PRODUCT_DIR}/services/kafka
wget https://downloads.apache.org/kafka/2.7.0/kafka_2.13-2.7.0.tgz
curl https://downloads.apache.org/kafka/2.7.1/kafka_2.13-2.7.1.tgz -O
tar xzf kafka_*.tgz --strip 1 && rm -rf kafka_*.tgz
chown -R kafka ${PRODUCT_DIR}/services/kafka
cd -
@ -166,7 +171,7 @@ END
fi
${package_manager} -y install yum-plugin-versionlock
${package_manager} -y install python3-dnf-plugin-versionlock || ${package_manager} -y install yum-plugin-versionlock
${package_manager} versionlock clear
${package_manager} -y install epel-release \
@ -187,6 +192,10 @@ ${package_manager} -y install epel-release \
redis --enablerepo=remi \
java
if [[ $PSQLExitCode -eq $UPDATE_AVAILABLE_CODE ]]; then
yum -y install postgresql-upgrade
postgresql-setup --upgrade || true
fi
postgresql-setup initdb || true
semanage permissive -a httpd_t