DocSpace-buildtools/build/install/OneClickInstall/install-RedHat.sh
Evgeniy Antonyuk c1fa203780
Feature/rpm support (#192)
* Create specfiles and systemd scripts

* Add fix

* Add systemd packaging

* add fix

* Add fix

* Add configuracion and fixes

* Update app-conf.sh and change cfg dir

* Add ability to start nodejs

* Update config

* Change owner of folders

* Delete temporary files

* Fix chmod config

* Fix configure docs

* Сode optimization

* Add configuration elasticsearch

* Rename directory

* Fix work with the name of branches that include '/'

* Fix work with the name of branches that include '/'

* Revert "Fix work with the name of branches that include '/'"

This reverts commit c0970cd84657dac503843720b0cdbce0130a329c.

* Revert "Fix work with the name of branches that include '/'"

This reverts commit 6ea3718df8950dd6ec87642195822a6ee433c40e.

* Add fix

* Add fix

* Add ability to change the release and version

* Fix docs configuration

* Add kafka configuration

* Add environment variables

* Add fix

* Add old rpms removal and buildroot removal

* Add OneClickInstall

* Correct the typo

* Move systemd from rpm to common

* Add a user-defined configuration option .json

* Add minor fix

* Add a machinekey generation

* Add a typo fix

* Change nodejs version

* Change the location of some folders

* Fix minor bugs

* Fix minor bugs

* Rename service directories

* Fix kafka privileges

Co-authored-by: Alexey Golubev <alexey.golubev@onlyoffice.com>
2021-03-19 15:50:47 +03:00

85 lines
2.1 KiB
Bash

#!/bin/bash
set -e
package_manager="yum"
package_sysname="onlyoffice";
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 Appserver.";
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