Evgeniy Antonyuk
4e5bd47c26
* Add a build and install new services * Change the packaging for the new build script * Correct the configuration * Add a bug fix with a mysql password containing ';' * Fix services crash error * Fix incorrect value addition in mysql * Fix a rabbitmq error on CentOS 8 * Fix creating an invalid mysql password * Fix non-existent tables Tenants * Add an update to 1click * Code correction * Add two new services * Add the buildpath variable * Code Optimization * Renaming services and creating a variable for the app name * Revert "Merge branch 'feature/rpm-update' of https://github.com/ONLYOFFICE/AppServer into feature/rpm-update" This reverts commit 19c1eae6f6e3f22f4cbc0e3276fa892b0d9fa97a, reversing changes made to fb36a996366291486e3b9f5a6f46398916ef8a6c. * Code Optimization * Code optimization * Code optimization and creating a variables
86 lines
2.2 KiB
Bash
86 lines
2.2 KiB
Bash
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
package_manager="yum"
|
|
package_sysname="onlyoffice";
|
|
product="appserver"
|
|
|
|
package_services="";
|
|
RES_APP_INSTALLED="is already installed";
|
|
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"
|
|
|
|
while [ "$1" != "" ]; do
|
|
case $1 in
|
|
|
|
-u | --update )
|
|
if [ "$2" != "" ]; then
|
|
UPDATE=$2
|
|
shift
|
|
fi
|
|
;;
|
|
|
|
-ls | --local_scripts )
|
|
if [ "$2" != "" ]; then
|
|
LOCAL_SCRIPTS=$2
|
|
shift
|
|
fi
|
|
;;
|
|
|
|
-? | -h | --help )
|
|
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
|
echo " Parameters:"
|
|
echo " -u, --update use to update existing components (true|false)"
|
|
echo " -ls, --local_scripts use 'true' to run local scripts (true|false)"
|
|
echo " -?, -h, --help this help"
|
|
echo
|
|
exit 0
|
|
;;
|
|
|
|
esac
|
|
shift
|
|
done
|
|
|
|
if [ -z "${UPDATE}" ]; then
|
|
UPDATE="false";
|
|
fi
|
|
|
|
if [ -z "${LOCAL_SCRIPTS}" ]; then
|
|
LOCAL_SCRIPTS="true";
|
|
fi
|
|
|
|
cat > /etc/yum.repos.d/onlyoffice.repo <<END
|
|
[onlyoffice]
|
|
name=onlyoffice repo
|
|
baseurl=http://download.onlyoffice.com/repo/centos/main/noarch/
|
|
gpgcheck=1
|
|
enabled=1
|
|
gpgkey=http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8320CA65CB2DE8E5
|
|
END
|
|
|
|
cat > /etc/yum.repos.d/onlyoffice4testing.repo <<END
|
|
[onlyoffice4testing]
|
|
name=onlyoffice4testing repo
|
|
baseurl=http://static.teamlab.info.s3.amazonaws.com/repo/4testing/centos/main/noarch/
|
|
gpgcheck=1
|
|
enabled=1
|
|
gpgkey=http://static.teamlab.info.s3.amazonaws.com/k8s
|
|
END
|
|
|
|
DOWNLOAD_URL_PREFIX="https://download.onlyoffice.com/install-appserver/install-RedHat"
|
|
|
|
if [ "$LOCAL_SCRIPTS" = "true" ]; then
|
|
source install-RedHat/bootstrap.sh
|
|
source install-RedHat/check-ports.sh
|
|
source install-RedHat/install-preq.sh
|
|
source install-RedHat/install-app.sh
|
|
else
|
|
source <(curl ${DOWNLOAD_URL_PREFIX}/bootstrap.sh)
|
|
source <(curl ${DOWNLOAD_URL_PREFIX}/check-ports.sh)
|
|
source <(curl ${DOWNLOAD_URL_PREFIX}/install-preq.sh)
|
|
source <(curl ${DOWNLOAD_URL_PREFIX}/install-app.sh)
|
|
fi
|