Add support to deb package (#266)
This commit is contained in:
parent
88f87d7a82
commit
dbc174e955
@ -39,7 +39,7 @@ product="appserver"
|
|||||||
|
|
||||||
while [ "$1" != "" ]; do
|
while [ "$1" != "" ]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
-ls | --local_scripts )
|
-ls | --localscripts )
|
||||||
if [ "$2" == "true" ] || [ "$2" == "false" ]; then
|
if [ "$2" == "true" ] || [ "$2" == "false" ]; then
|
||||||
PARAMETERS="$PARAMETERS ${1}";
|
PARAMETERS="$PARAMETERS ${1}";
|
||||||
LOCAL_SCRIPTS=$2
|
LOCAL_SCRIPTS=$2
|
||||||
|
85
build/install/OneClickInstall/install-Debian.sh
Normal file
85
build/install/OneClickInstall/install-Debian.sh
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
package_sysname="onlyoffice";
|
||||||
|
DS_COMMON_NAME="onlyoffice";
|
||||||
|
product="appserver"
|
||||||
|
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 | --localscripts )
|
||||||
|
if [ "$2" != "" ]; then
|
||||||
|
LOCAL_SCRIPTS=$2
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
-? | -h | --help )
|
||||||
|
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||||
|
echo " Parameters:"
|
||||||
|
echo " -it, --installation_type installation type (COMMUNITY|ENTERPRISE|DEVELOPER)"
|
||||||
|
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="false";
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||||
|
apt-get update;
|
||||||
|
apt-get install -yq curl;
|
||||||
|
fi
|
||||||
|
|
||||||
|
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}/develop/build/install/OneClickInstall/install-Debian"
|
||||||
|
if [ "${LOCAL_SCRIPTS}" == "true" ]; then
|
||||||
|
source install-Debian/bootstrap.sh
|
||||||
|
else
|
||||||
|
source <(curl ${DOWNLOAD_URL_PREFIX}/bootstrap.sh)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# add onlyoffice repo
|
||||||
|
echo "deb http://download.onlyoffice.com/repo/debian squeeze main" | tee /etc/apt/sources.list.d/onlyoffice.list
|
||||||
|
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys CB2DE8E5
|
||||||
|
echo "deb http://static.teamlab.info.s3.amazonaws.com/repo/4testing/debian stable main" | sudo tee /etc/apt/sources.list.d/onlyoffice4testing.list
|
||||||
|
|
||||||
|
declare -x LANG="en_US.UTF-8"
|
||||||
|
declare -x LANGUAGE="en_US:en"
|
||||||
|
declare -x LC_ALL="en_US.UTF-8"
|
||||||
|
|
||||||
|
if [ "${LOCAL_SCRIPTS}" == "true" ]; then
|
||||||
|
source install-Debian/tools.sh
|
||||||
|
source install-Debian/check-ports.sh
|
||||||
|
source install-Debian/install-preq.sh
|
||||||
|
source install-Debian/install-app.sh
|
||||||
|
else
|
||||||
|
source <(curl ${DOWNLOAD_URL_PREFIX}/tools.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
|
23
build/install/OneClickInstall/install-Debian/bootstrap.sh
Normal file
23
build/install/OneClickInstall/install-Debian/bootstrap.sh
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cat<<EOF
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# BOOTSTRAP
|
||||||
|
#######################################
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if ! dpkg -l | grep -q "sudo"; then
|
||||||
|
apt-get install -yq sudo
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! dpkg -l | grep -q "net-tools"; then
|
||||||
|
apt-get install -yq net-tools
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! dpkg -l | grep -q "dirmngr"; then
|
||||||
|
apt-get install -yq dirmngr
|
||||||
|
fi
|
39
build/install/OneClickInstall/install-Debian/check-ports.sh
Normal file
39
build/install/OneClickInstall/install-Debian/check-ports.sh
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cat<<EOF
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# CHECK PORTS
|
||||||
|
#######################################
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if dpkg -l | grep -q "${product}"; then
|
||||||
|
echo "${product} $RES_APP_INSTALLED"
|
||||||
|
APPSERVER_INSTALLED="true";
|
||||||
|
elif [ $UPDATE != "true" ] && netstat -lnp | awk '{print $4}' | grep -qE ":80$|:8081$|:8083$|:5001$|:5002$|:8080$|:80$"; then
|
||||||
|
echo "${product} $RES_APP_CHECK_PORTS: 80, 8081, 8083, 5001, 5002";
|
||||||
|
echo "$RES_CHECK_PORTS"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
APPSERVER_INSTALLED="false";
|
||||||
|
fi
|
||||||
|
|
||||||
|
if dpkg -l | grep -q "${package_sysname}-documentserver"; then
|
||||||
|
echo "${package_sysname}-documentserver $RES_APP_INSTALLED"
|
||||||
|
DOCUMENT_SERVER_INSTALLED="true";
|
||||||
|
elif [ $UPDATE != "true" ] && netstat -lnp | awk '{print $4}' | grep -qE ":8083$|:5432$|:5672$|:6379$|:8000$|:8080$"; then
|
||||||
|
echo "${package_sysname}-documentserver $RES_APP_CHECK_PORTS: 8083, 5432, 5672, 6379, 8000, 8080";
|
||||||
|
echo "$RES_CHECK_PORTS"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
DOCUMENT_SERVER_INSTALLED="false";
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$APPSERVER_INSTALLED" = "true" ] || [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then
|
||||||
|
if [ "$UPDATE" != "true" ]; then
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
fi
|
144
build/install/OneClickInstall/install-Debian/install-app.sh
Normal file
144
build/install/OneClickInstall/install-Debian/install-app.sh
Normal file
@ -0,0 +1,144 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cat<<EOF
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# INSTALL APP
|
||||||
|
#######################################
|
||||||
|
|
||||||
|
EOF
|
||||||
|
apt-get -y update
|
||||||
|
|
||||||
|
if [ "$DOCUMENT_SERVER_INSTALLED" = "false" ]; then
|
||||||
|
DS_PORT=${DS_PORT:-8083};
|
||||||
|
|
||||||
|
DS_DB_HOST=localhost;
|
||||||
|
DS_DB_NAME=$DS_COMMON_NAME;
|
||||||
|
DS_DB_USER=$DS_COMMON_NAME;
|
||||||
|
DS_DB_PWD=$DS_COMMON_NAME;
|
||||||
|
|
||||||
|
DS_JWT_ENABLED=${DS_JWT_ENABLED:-true};
|
||||||
|
DS_JWT_SECRET="$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 12)";
|
||||||
|
DS_JWT_HEADER="AuthorizationJwt";
|
||||||
|
|
||||||
|
if ! su - postgres -s /bin/bash -c "psql -lqt" | cut -d \| -f 1 | grep -q ${DS_DB_NAME}; then
|
||||||
|
su - postgres -s /bin/bash -c "psql -c \"CREATE DATABASE ${DS_DB_NAME};\""
|
||||||
|
su - postgres -s /bin/bash -c "psql -c \"CREATE USER ${DS_DB_USER} WITH password '${DS_DB_PWD}';\""
|
||||||
|
su - postgres -s /bin/bash -c "psql -c \"GRANT ALL privileges ON DATABASE ${DS_DB_NAME} TO ${DS_DB_USER};\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ${package_sysname}-documentserver $DS_COMMON_NAME/ds-port select $DS_PORT | sudo debconf-set-selections
|
||||||
|
echo ${package_sysname}-documentserver $DS_COMMON_NAME/db-pwd select $DS_DB_PWD | sudo debconf-set-selections
|
||||||
|
echo ${package_sysname}-documentserver $DS_COMMON_NAME/db-user $DS_DB_USER | sudo debconf-set-selections
|
||||||
|
echo ${package_sysname}-documentserver $DS_COMMON_NAME/db-name $DS_DB_NAME | sudo debconf-set-selections
|
||||||
|
echo ${package_sysname}-documentserver-de $DS_COMMON_NAME/jwt-enabled select ${DS_JWT_ENABLED} | sudo debconf-set-selections
|
||||||
|
echo ${package_sysname}-documentserver-de $DS_COMMON_NAME/jwt-secret select ${DS_JWT_SECRET} | sudo debconf-set-selections
|
||||||
|
echo ${package_sysname}-documentserver-de $DS_COMMON_NAME/jwt-header select ${DS_JWT_HEADER} | sudo debconf-set-selections
|
||||||
|
echo ${package_sysname}-documentserver-ee $DS_COMMON_NAME/jwt-enabled select ${DS_JWT_ENABLED} | sudo debconf-set-selections
|
||||||
|
echo ${package_sysname}-documentserver-ee $DS_COMMON_NAME/jwt-secret select ${DS_JWT_SECRET} | sudo debconf-set-selections
|
||||||
|
echo ${package_sysname}-documentserver-ee $DS_COMMON_NAME/jwt-header select ${DS_JWT_HEADER} | sudo debconf-set-selections
|
||||||
|
|
||||||
|
apt-get install -yq ${package_sysname}-documentserver
|
||||||
|
elif [ "$UPDATE" = "true" ] && [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then
|
||||||
|
apt-get install -y --only-upgrade ${package_sysname}-documentserver
|
||||||
|
fi
|
||||||
|
|
||||||
|
NGINX_ROOT_DIR="/etc/nginx"
|
||||||
|
|
||||||
|
NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-$(grep processor /proc/cpuinfo | wc -l)};
|
||||||
|
NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$(ulimit -n)};
|
||||||
|
|
||||||
|
sed 's/^worker_processes.*/'"worker_processes ${NGINX_WORKER_PROCESSES};"'/' -i ${NGINX_ROOT_DIR}/nginx.conf
|
||||||
|
sed 's/worker_connections.*/'"worker_connections ${NGINX_WORKER_CONNECTIONS};"'/' -i ${NGINX_ROOT_DIR}/nginx.conf
|
||||||
|
|
||||||
|
if ! id "nginx" &>/dev/null; then
|
||||||
|
systemctl stop nginx
|
||||||
|
|
||||||
|
rm -dfr /var/log/nginx/*
|
||||||
|
rm -dfr /var/cache/nginx/*
|
||||||
|
useradd -s /bin/false nginx
|
||||||
|
|
||||||
|
systemctl start nginx
|
||||||
|
else
|
||||||
|
systemctl reload nginx
|
||||||
|
fi
|
||||||
|
|
||||||
|
APPSERVER_INSTALLED_VERSION=$(apt-cache policy ${product} | awk 'NR==2{print $2}')
|
||||||
|
APPSERVER_LATEST_VERSION=$(apt-cache policy ${product} | awk 'NR==3{print $2}')
|
||||||
|
if [ "$APPSERVER_INSTALLED_VERSION" != "$APPSERVER_LATEST_VERSION" ]; then
|
||||||
|
APPSERVER_NEED_UPDATE="true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$APPSERVER_INSTALLED" = "false" ]; then
|
||||||
|
apt-get install -y ${product} || true #Fix error 'Failed to fetch'
|
||||||
|
apt-get install -y ${product}
|
||||||
|
elif [ "$APPSERVER_NEED_UPDATE" = "true" ]; then
|
||||||
|
ENVIRONMENT="$(cat /lib/systemd/system/${product}-api.service | grep -oP 'ENVIRONMENT=\K.*')"
|
||||||
|
USER_CONNECTIONSTRING=$(json -f /etc/onlyoffice/${product}/appsettings.$ENVIRONMENT.json ConnectionStrings.default.connectionString)
|
||||||
|
MYSQL_SERVER_HOST=$(echo $USER_CONNECTIONSTRING | grep -oP 'Server=\K.*' | grep -o '^[^;]*')
|
||||||
|
MYSQL_SERVER_DB_NAME=$(echo $USER_CONNECTIONSTRING | grep -oP 'Database=\K.*' | grep -o '^[^;]*')
|
||||||
|
MYSQL_SERVER_USER=$(echo $USER_CONNECTIONSTRING | grep -oP 'User ID=\K.*' | grep -o '^[^;]*')
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${APPSERVER_INSTALLED}" = "false" ] || [ "${APPSERVER_NEED_UPDATE}" = "true" ]; then
|
||||||
|
expect << EOF
|
||||||
|
set timeout -1
|
||||||
|
log_user 1
|
||||||
|
|
||||||
|
if { "${UPDATE}" == "true" } {
|
||||||
|
spawn ${product}-configuration.sh -e ${ENVIRONMENT}
|
||||||
|
} else {
|
||||||
|
spawn ${product}-configuration.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
expect -re "Database host:"
|
||||||
|
send "\025$MYSQL_SERVER_HOST\r"
|
||||||
|
|
||||||
|
expect -re "Database name:"
|
||||||
|
send "\025$MYSQL_SERVER_DB_NAME\r"
|
||||||
|
|
||||||
|
expect -re "Database user:"
|
||||||
|
send "\025$MYSQL_SERVER_USER\r"
|
||||||
|
|
||||||
|
expect -re "Database password:"
|
||||||
|
send "\025$MYSQL_SERVER_PASS\r"
|
||||||
|
|
||||||
|
expect eof
|
||||||
|
EOF
|
||||||
|
APPSERVER_INSTALLED="true";
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "$RES_INSTALL_SUCCESS"
|
||||||
|
echo "$RES_QUESTIONS"
|
||||||
|
echo ""
|
192
build/install/OneClickInstall/install-Debian/install-preq.sh
Normal file
192
build/install/OneClickInstall/install-Debian/install-preq.sh
Normal file
@ -0,0 +1,192 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
cat<<EOF
|
||||||
|
|
||||||
|
#######################################
|
||||||
|
# INSTALL PREREQUISITES
|
||||||
|
#######################################
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
if [ "$DIST" = "debian" ] && [ $(apt-cache search ttf-mscorefonts-installer | wc -l) -eq 0 ]; then
|
||||||
|
echo "deb http://ftp.uk.debian.org/debian/ $DISTRIB_CODENAME main contrib" >> /etc/apt/sources.list
|
||||||
|
echo "deb-src http://ftp.uk.debian.org/debian/ $DISTRIB_CODENAME main contrib" >> /etc/apt/sources.list
|
||||||
|
fi
|
||||||
|
|
||||||
|
apt-get -y update
|
||||||
|
|
||||||
|
if ! dpkg -l | grep -q "locales"; then
|
||||||
|
apt-get install -yq locales
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! dpkg -l | grep -q "dirmngr"; then
|
||||||
|
apt-get install -yq dirmngr
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! dpkg -l | grep -q "software-properties-common"; then
|
||||||
|
apt-get install -yq software-properties-common
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||||
|
apt-get install -yq curl;
|
||||||
|
fi
|
||||||
|
|
||||||
|
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 -
|
||||||
|
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
|
||||||
|
curl -sL https://deb.nodesource.com/setup_12.x | bash -
|
||||||
|
|
||||||
|
#add yarn repo
|
||||||
|
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
|
||||||
|
dpkg -i packages-microsoft-prod.deb
|
||||||
|
rm packages-microsoft-prod.deb
|
||||||
|
|
||||||
|
#install kafka
|
||||||
|
PRODUCT_DIR="/var/www/${product}"
|
||||||
|
if [ "$(ls -A "$PRODUCT_DIR/services/kafka" 2> /dev/null)" == "" ]; then
|
||||||
|
mkdir -p ${PRODUCT_DIR}/services/
|
||||||
|
if ! cat /etc/passwd | grep -q "kafka"; 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
|
||||||
|
tar xzf kafka_*.tgz --strip 1 && rm -rf kafka_*.tgz
|
||||||
|
chown -R kafka ${PRODUCT_DIR}/services/kafka
|
||||||
|
cd -
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e /lib/systemd/system/zookeeper.service ]; then
|
||||||
|
cat > /lib/systemd/system/zookeeper.service <<END
|
||||||
|
[Unit]
|
||||||
|
Requires=network.target remote-fs.target
|
||||||
|
After=network.target remote-fs.target
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=kafka
|
||||||
|
ExecStart=/bin/sh -c '${PRODUCT_DIR}/services/kafka/bin/zookeeper-server-start.sh ${PRODUCT_DIR}/services/kafka/config/zookeeper.properties > ${PRODUCT_DIR}/services/kafka/zookeeper.log 2>&1'
|
||||||
|
ExecStop=${PRODUCT_DIR}/services/kafka/bin/zookeeper-server-stop.sh
|
||||||
|
Restart=on-abnormal
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
END
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e /lib/systemd/system/kafka.service ]; then
|
||||||
|
cat > /lib/systemd/system/kafka.service <<END
|
||||||
|
[Unit]
|
||||||
|
Requires=zookeeper.service
|
||||||
|
After=zookeeper.service
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=kafka
|
||||||
|
ExecStart=/bin/sh -c '${PRODUCT_DIR}/services/kafka/bin/kafka-server-start.sh ${PRODUCT_DIR}/services/kafka/config/server.properties > ${PRODUCT_DIR}/services/kafka/kafka.log 2>&1'
|
||||||
|
ExecStop=${PRODUCT_DIR}/services/kafka/bin/kafka-server-stop.sh
|
||||||
|
Restart=on-abnormal
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
END
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! dpkg -l | grep -q "mysql-server"; then
|
||||||
|
|
||||||
|
MYSQL_SERVER_HOST=${MYSQL_SERVER_HOST:-"localhost"}
|
||||||
|
MYSQL_SERVER_DB_NAME=${MYSQL_SERVER_DB_NAME:-"${package_sysname}"}
|
||||||
|
MYSQL_SERVER_USER=${MYSQL_SERVER_USER:-"root"}
|
||||||
|
MYSQL_SERVER_PASS=${MYSQL_SERVER_PASS:-"$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 12)"}
|
||||||
|
|
||||||
|
# setup mysql 8.0 package
|
||||||
|
curl -OL http://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb
|
||||||
|
echo "mysql-apt-config mysql-apt-config/repo-codename select $DISTRIB_CODENAME" | debconf-set-selections
|
||||||
|
echo "mysql-apt-config mysql-apt-config/repo-distro select $DIST" | debconf-set-selections
|
||||||
|
echo "mysql-apt-config mysql-apt-config/select-server select mysql-8.0" | debconf-set-selections
|
||||||
|
DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.15-1_all.deb
|
||||||
|
rm -f mysql-apt-config_0.8.15-1_all.deb
|
||||||
|
|
||||||
|
echo mysql-community-server mysql-community-server/root-pass password ${MYSQL_SERVER_PASS} | debconf-set-selections
|
||||||
|
echo mysql-community-server mysql-community-server/re-root-pass password ${MYSQL_SERVER_PASS} | debconf-set-selections
|
||||||
|
echo mysql-community-server mysql-server/default-auth-override select "Use Strong Password Encryption (RECOMMENDED)" | debconf-set-selections
|
||||||
|
echo mysql-server-8.0 mysql-server/root_password password ${MYSQL_SERVER_PASS} | debconf-set-selections
|
||||||
|
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
|
||||||
|
if [ "$DIST" = "ubuntu" ]; then
|
||||||
|
add-apt-repository -y ppa:chris-lea/redis-server
|
||||||
|
fi
|
||||||
|
|
||||||
|
#add nginx repo
|
||||||
|
wget http://nginx.org/keys/nginx_signing.key
|
||||||
|
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
|
||||||
|
|
||||||
|
# setup msttcorefonts
|
||||||
|
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections
|
||||||
|
|
||||||
|
# install
|
||||||
|
apt-get install -yq wget \
|
||||||
|
expect \
|
||||||
|
nano \
|
||||||
|
nodejs \
|
||||||
|
gcc \
|
||||||
|
g++ \
|
||||||
|
make \
|
||||||
|
yarn \
|
||||||
|
dotnet-sdk-5.0 \
|
||||||
|
mysql-server \
|
||||||
|
mysql-client \
|
||||||
|
postgresql \
|
||||||
|
redis-server \
|
||||||
|
rabbitmq-server \
|
||||||
|
nginx-extras \
|
||||||
|
default-jdk
|
||||||
|
|
||||||
|
if [ -e /etc/redis/redis.conf ]; then
|
||||||
|
sed -i "s/bind .*/bind 127.0.0.1/g" /etc/redis/redis.conf
|
||||||
|
sed -r "/^save\s[0-9]+/d" -i /etc/redis/redis.conf
|
||||||
|
|
||||||
|
service redis-server restart
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -e /usr/bin/json ]; then
|
||||||
|
npm i json -g >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! dpkg -l | grep -q "elasticsearch"; then
|
||||||
|
apt-get install -yq elasticsearch=${ELASTIC_VERSION}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# disable apparmor for mysql
|
||||||
|
if which apparmor_parser && [ ! -f /etc/apparmor.d/disable/usr.sbin.mysqld ] && [ -f /etc/apparmor.d/disable/usr.sbin.mysqld ]; then
|
||||||
|
ln -sf /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/;
|
||||||
|
apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld;
|
||||||
|
fi
|
33
build/install/OneClickInstall/install-Debian/tools.sh
Normal file
33
build/install/OneClickInstall/install-Debian/tools.sh
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
command_exists () {
|
||||||
|
type "$1" &> /dev/null;
|
||||||
|
}
|
||||||
|
|
||||||
|
ARCH="$(dpkg --print-architecture)"
|
||||||
|
if [ "$ARCH" != "amd64" ]; then
|
||||||
|
echo "ONLYOFFICE ${product^^} doesn't support architecture '$ARCH'"
|
||||||
|
exit;
|
||||||
|
fi
|
||||||
|
|
||||||
|
REV=`cat /etc/debian_version`
|
||||||
|
DIST='Debian'
|
||||||
|
if [ -f /etc/lsb-release ] ; then
|
||||||
|
DIST=`cat /etc/lsb-release | grep '^DISTRIB_ID' | awk -F= '{ print $2 }'`
|
||||||
|
REV=`cat /etc/lsb-release | grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }'`
|
||||||
|
DISTRIB_CODENAME=`cat /etc/lsb-release | grep '^DISTRIB_CODENAME' | awk -F= '{ print $2 }'`
|
||||||
|
DISTRIB_RELEASE=`cat /etc/lsb-release | grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }'`
|
||||||
|
elif [ -f /etc/lsb_release ] || [ -f /usr/bin/lsb_release ] ; then
|
||||||
|
DIST=`lsb_release -a 2>&1 | grep 'Distributor ID:' | awk -F ":" '{print $2 }' | tr -d '[:space:]'`
|
||||||
|
REV=`lsb_release -a 2>&1 | grep 'Release:' | awk -F ":" '{print $2 }' | tr -d '[:space:]'`
|
||||||
|
DISTRIB_CODENAME=`lsb_release -a 2>&1 | grep 'Codename:' | awk -F ":" '{print $2 }' | tr -d '[:space:]'`
|
||||||
|
DISTRIB_RELEASE=`lsb_release -a 2>&1 | grep 'Release:' | awk -F ":" '{print $2 }' | tr -d '[:space:]'`
|
||||||
|
elif [ -f /etc/os-release ] ; then
|
||||||
|
DISTRIB_CODENAME=$(grep "VERSION=" /etc/os-release |awk -F= {' print $2'}|sed s/\"//g |sed s/[0-9]//g | sed s/\)$//g |sed s/\(//g | tr -d '[:space:]')
|
||||||
|
DISTRIB_RELEASE=$(grep "VERSION_ID=" /etc/os-release |awk -F= {' print $2'}|sed s/\"//g |sed s/[0-9]//g | sed s/\)$//g |sed s/\(//g | tr -d '[:space:]')
|
||||||
|
fi
|
||||||
|
|
||||||
|
DIST=`echo "$DIST" | tr '[:upper:]' '[:lower:]' | xargs`;
|
||||||
|
DISTRIB_CODENAME=`echo "$DISTRIB_CODENAME" | tr '[:upper:]' '[:lower:]' | xargs`;
|
@ -34,6 +34,7 @@
|
|||||||
PRODUCT="onlyoffice"
|
PRODUCT="onlyoffice"
|
||||||
BASE_DIR="/app/$PRODUCT";
|
BASE_DIR="/app/$PRODUCT";
|
||||||
STATUS=""
|
STATUS=""
|
||||||
|
SRV_VERSION=""
|
||||||
|
|
||||||
NETWORK=${PRODUCT}
|
NETWORK=${PRODUCT}
|
||||||
|
|
||||||
@ -251,12 +252,19 @@ while [ "$1" != "" ]; do
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-ls | --local_scripts )
|
-ls | --localscripts )
|
||||||
if [ "$2" != "" ]; then
|
if [ "$2" != "" ]; then
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
-vas | --versionappserver )
|
||||||
|
if [ "$2" != "" ]; then
|
||||||
|
SRV_VERSION=$2
|
||||||
|
shift
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
-? | -h | --help )
|
-? | -h | --help )
|
||||||
echo " Usage: bash $HELP_TARGET [PARAMETER] [[PARAMETER], ...]"
|
echo " Usage: bash $HELP_TARGET [PARAMETER] [[PARAMETER], ...]"
|
||||||
echo
|
echo
|
||||||
@ -265,6 +273,7 @@ while [ "$1" != "" ]; do
|
|||||||
echo " -un, --username dockerhub username"
|
echo " -un, --username dockerhub username"
|
||||||
echo " -p, --password dockerhub password"
|
echo " -p, --password dockerhub password"
|
||||||
echo " -ias, --installappserver install or update appserver (true|false)"
|
echo " -ias, --installappserver install or update appserver (true|false)"
|
||||||
|
echo " -vas, --versionappserver select the version to install appserver (latest|develop|version number)"
|
||||||
echo " -ids, --installdocumentserver install or update document server (true|false)"
|
echo " -ids, --installdocumentserver install or update document server (true|false)"
|
||||||
echo " -imysql, --installmysql install or update mysql (true|false)"
|
echo " -imysql, --installmysql install or update mysql (true|false)"
|
||||||
echo " -mysqlrp, --mysqlrootpassword mysql server root password"
|
echo " -mysqlrp, --mysqlrootpassword mysql server root password"
|
||||||
@ -828,6 +837,7 @@ install_appserver () {
|
|||||||
reconfigure SERVICE_PORT ${SERVICE_PORT}
|
reconfigure SERVICE_PORT ${SERVICE_PORT}
|
||||||
reconfigure APP_CORE_MACHINEKEY ${APP_CORE_MACHINEKEY}
|
reconfigure APP_CORE_MACHINEKEY ${APP_CORE_MACHINEKEY}
|
||||||
reconfigure APP_CORE_BASE_DOMAIN ${APP_CORE_BASE_DOMAIN}
|
reconfigure APP_CORE_BASE_DOMAIN ${APP_CORE_BASE_DOMAIN}
|
||||||
|
reconfigure SRV_VERSION ${SRV_VERSION}
|
||||||
|
|
||||||
if [[ -n $EXTERNAL_PORT ]]; then
|
if [[ -n $EXTERNAL_PORT ]]; then
|
||||||
sed -i "s/8092:8092/${EXTERNAL_PORT}:8092/g" $BASE_DIR/appserver.yml
|
sed -i "s/8092:8092/${EXTERNAL_PORT}:8092/g" $BASE_DIR/appserver.yml
|
||||||
|
@ -31,7 +31,7 @@ while [ "$1" != "" ]; do
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
-ls | --local_scripts )
|
-ls | --localscripts )
|
||||||
if [ "$2" != "" ]; then
|
if [ "$2" != "" ]; then
|
||||||
LOCAL_SCRIPTS=$2
|
LOCAL_SCRIPTS=$2
|
||||||
shift
|
shift
|
||||||
|
@ -54,14 +54,6 @@ if [ "${MYSQL_FIRST_TIME_INSTALL}" = "true" ]; then
|
|||||||
|
|
||||||
systemctl restart mysqld
|
systemctl restart mysqld
|
||||||
fi
|
fi
|
||||||
elif [ "${UPDATE}" = "true" ] && [ "${MYSQL_FIRST_TIME_INSTALL}" != "true" ]; then
|
|
||||||
ENVIRONMENT="$(cat /etc/systemd/system/${product}-api.service | grep -oP 'ENVIRONMENT=\K.*')"
|
|
||||||
USER_CONNECTIONSTRING=$(json -f /etc/onlyoffice/${product}/appsettings.$ENVIRONMENT.json ConnectionStrings.default.connectionString)
|
|
||||||
MYSQL_SERVER_HOST=$(echo $USER_CONNECTIONSTRING | grep -oP 'Server=\K.*' | grep -o '^[^;]*')
|
|
||||||
MYSQL_SERVER_DB_NAME=$(echo $USER_CONNECTIONSTRING | grep -oP 'Database=\K.*' | grep -o '^[^;]*')
|
|
||||||
MYSQL_SERVER_USER=$(echo $USER_CONNECTIONSTRING | grep -oP 'User ID=\K.*' | grep -o '^[^;]*')
|
|
||||||
MYSQL_SERVER_PORT=$(echo $USER_CONNECTIONSTRING | grep -oP 'Port=\K.*' | grep -o '^[^;]*')
|
|
||||||
MYSQL_ROOT_PASS=$(echo $USER_CONNECTIONSTRING | grep -oP 'Password=\K.*' | grep -o '^[^;]*')
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$DOCUMENT_SERVER_INSTALLED" = "false" ]; then
|
if [ "$DOCUMENT_SERVER_INSTALLED" = "false" ]; then
|
||||||
@ -115,11 +107,6 @@ expect << EOF
|
|||||||
expect -re "Password"
|
expect -re "Password"
|
||||||
send "\025$DS_DB_PWD\r"
|
send "\025$DS_DB_PWD\r"
|
||||||
|
|
||||||
if { "${INSTALLATION_TYPE}" == "ENTERPRISE" || "${INSTALLATION_TYPE}" == "DEVELOPER" } {
|
|
||||||
expect "Configuring redis access..."
|
|
||||||
send "\025$DS_REDIS_HOST\r"
|
|
||||||
}
|
|
||||||
|
|
||||||
expect "Configuring AMQP access... "
|
expect "Configuring AMQP access... "
|
||||||
expect -re "Host"
|
expect -re "Host"
|
||||||
send "\025$DS_RABBITMQ_HOST\r"
|
send "\025$DS_RABBITMQ_HOST\r"
|
||||||
@ -152,14 +139,26 @@ if rpm -q "firewalld"; then
|
|||||||
systemctl restart firewalld.service
|
systemctl restart firewalld.service
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$APPSERVER_INSTALLED" = "false" ] || [ "$UPDATE" = "true" ]; then
|
{ ${package_manager} check-update ${package_sysname}-${product}; APPSERVER_CHECK_UPDATE=$?; } || true
|
||||||
if [ "$APPSERVER_INSTALLED" = "false" ]; then
|
if [[ $APPSERVER_CHECK_UPDATE -eq $UPDATE_AVAILABLE_CODE ]]; then
|
||||||
${package_manager} install -y ${package_sysname}-${product}
|
APPSERVER_NEED_UPDATE="true"
|
||||||
else
|
fi
|
||||||
${package_manager} -y update ${package_sysname}-${product}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${MYSQL_FIRST_TIME_INSTALL}" = "true" ] || [ "$UPDATE" = "true" ]; then
|
if [ "$APPSERVER_INSTALLED" = "false" ]; then
|
||||||
|
${package_manager} install -y ${package_sysname}-${product}
|
||||||
|
elif [ "$APPSERVER_NEED_UPDATE" = "true" ]; then
|
||||||
|
ENVIRONMENT="$(cat /lib/systemd/system/${product}-api.service | grep -oP 'ENVIRONMENT=\K.*')"
|
||||||
|
USER_CONNECTIONSTRING=$(json -f /etc/onlyoffice/${product}/appsettings.$ENVIRONMENT.json ConnectionStrings.default.connectionString)
|
||||||
|
MYSQL_SERVER_HOST=$(echo $USER_CONNECTIONSTRING | grep -oP 'Server=\K.*' | grep -o '^[^;]*')
|
||||||
|
MYSQL_SERVER_DB_NAME=$(echo $USER_CONNECTIONSTRING | grep -oP 'Database=\K.*' | grep -o '^[^;]*')
|
||||||
|
MYSQL_SERVER_USER=$(echo $USER_CONNECTIONSTRING | grep -oP 'User ID=\K.*' | grep -o '^[^;]*')
|
||||||
|
MYSQL_SERVER_PORT=$(echo $USER_CONNECTIONSTRING | grep -oP 'Port=\K.*' | grep -o '^[^;]*')
|
||||||
|
MYSQL_ROOT_PASS=$(echo $USER_CONNECTIONSTRING | grep -oP 'Password=\K.*' | grep -o '^[^;]*')
|
||||||
|
|
||||||
|
${package_manager} -y update ${package_sysname}-${product}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${APPSERVER_INSTALLED}" = "false" ] || [ "$APPSERVER_NEED_UPDATE" = "true" ]; then
|
||||||
expect << EOF
|
expect << EOF
|
||||||
set timeout -1
|
set timeout -1
|
||||||
log_user 1
|
log_user 1
|
||||||
@ -185,10 +184,6 @@ expect << EOF
|
|||||||
expect eof
|
expect eof
|
||||||
EOF
|
EOF
|
||||||
APPSERVER_INSTALLED="true";
|
APPSERVER_INSTALLED="true";
|
||||||
else
|
|
||||||
bash ${product}-configuration.sh
|
|
||||||
APPSERVER_INSTALLED="true";
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -79,11 +79,13 @@ if ! rpm -q mysql-community-server; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
#add elasticsearch repo
|
#add elasticsearch repo
|
||||||
|
ELASTIC_VERSION="7.13.1"
|
||||||
|
ELASTIC_DIST=$(echo $ELASTIC_VERSION | awk '{ print int($1) }')
|
||||||
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
||||||
cat > /etc/yum.repos.d/elasticsearch.repo <<END
|
cat > /etc/yum.repos.d/elasticsearch.repo <<END
|
||||||
[elasticsearch]
|
[elasticsearch]
|
||||||
name=Elasticsearch repository for 7.x packages
|
name=Elasticsearch repository for ${ELASTIC_DIST}.x packages
|
||||||
baseurl=https://artifacts.elastic.co/packages/7.x/yum
|
baseurl=https://artifacts.elastic.co/packages/${ELASTIC_DIST}.x/yum
|
||||||
gpgcheck=1
|
gpgcheck=1
|
||||||
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
|
||||||
enabled=0
|
enabled=0
|
||||||
@ -93,15 +95,18 @@ END
|
|||||||
|
|
||||||
#install kafka
|
#install kafka
|
||||||
PRODUCT_DIR="/var/www/${product}"
|
PRODUCT_DIR="/var/www/${product}"
|
||||||
mkdir -p ${PRODUCT_DIR}/services/
|
if [ "$(ls -A "$PRODUCT_DIR/services/kafka" 2> /dev/null)" == "" ]; then
|
||||||
getent passwd kafka >/dev/null || useradd -m -d ${PRODUCT_DIR}/services/kafka -s /sbin/nologin -p kafka kafka
|
mkdir -p ${PRODUCT_DIR}/services/
|
||||||
cd ${PRODUCT_DIR}/services/kafka
|
getent passwd kafka >/dev/null || useradd -m -d ${PRODUCT_DIR}/services/kafka -s /sbin/nologin -p kafka kafka
|
||||||
wget https://downloads.apache.org/kafka/2.7.0/kafka_2.13-2.7.0.tgz
|
cd ${PRODUCT_DIR}/services/kafka
|
||||||
tar xzf kafka_*.tgz --strip 1 && rm -rf kafka_*.tgz
|
wget https://downloads.apache.org/kafka/2.7.0/kafka_2.13-2.7.0.tgz
|
||||||
chown -R kafka ${PRODUCT_DIR}/services/kafka
|
tar xzf kafka_*.tgz --strip 1 && rm -rf kafka_*.tgz
|
||||||
cd -
|
chown -R kafka ${PRODUCT_DIR}/services/kafka
|
||||||
|
cd -
|
||||||
|
fi
|
||||||
|
|
||||||
cat > /etc/systemd/system/zookeeper.service <<END
|
if [ ! -e /lib/systemd/system/zookeeper.service ]; then
|
||||||
|
cat > /lib/systemd/system/zookeeper.service <<END
|
||||||
[Unit]
|
[Unit]
|
||||||
Requires=network.target remote-fs.target
|
Requires=network.target remote-fs.target
|
||||||
After=network.target remote-fs.target
|
After=network.target remote-fs.target
|
||||||
@ -114,8 +119,10 @@ Restart=on-abnormal
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
END
|
END
|
||||||
|
fi
|
||||||
|
|
||||||
cat > /etc/systemd/system/kafka.service <<END
|
if [ ! -e /lib/systemd/system/kafka.service ]; then
|
||||||
|
cat > /lib/systemd/system/kafka.service <<END
|
||||||
[Unit]
|
[Unit]
|
||||||
Requires=zookeeper.service
|
Requires=zookeeper.service
|
||||||
After=zookeeper.service
|
After=zookeeper.service
|
||||||
@ -128,6 +135,7 @@ Restart=on-abnormal
|
|||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
END
|
END
|
||||||
|
fi
|
||||||
|
|
||||||
# add nginx repo
|
# add nginx repo
|
||||||
cat > /etc/yum.repos.d/nginx.repo <<END
|
cat > /etc/yum.repos.d/nginx.repo <<END
|
||||||
@ -169,14 +177,15 @@ ${package_manager} -y install epel-release \
|
|||||||
make \
|
make \
|
||||||
yarn \
|
yarn \
|
||||||
dotnet-sdk-5.0 \
|
dotnet-sdk-5.0 \
|
||||||
elasticsearch-7.13.1 --enablerepo=elasticsearch \
|
elasticsearch-${ELASTIC_VERSION} --enablerepo=elasticsearch \
|
||||||
mysql-server \
|
mysql-server \
|
||||||
nginx \
|
nginx \
|
||||||
supervisor \
|
supervisor \
|
||||||
postgresql \
|
postgresql \
|
||||||
postgresql-server \
|
postgresql-server \
|
||||||
rabbitmq-server$rabbitmq_version \
|
rabbitmq-server$rabbitmq_version \
|
||||||
redis --enablerepo=remi
|
redis --enablerepo=remi \
|
||||||
|
java
|
||||||
|
|
||||||
postgresql-setup initdb || true
|
postgresql-setup initdb || true
|
||||||
|
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
PRODUCT="appserver"
|
PRODUCT="appserver"
|
||||||
ENVIRONMENT="production"
|
ENVIRONMENT="production"
|
||||||
|
|
||||||
APP_DIR="/etc/onlyoffice/${PRODUCT}"
|
APP_DIR="/etc/onlyoffice/${PRODUCT}"
|
||||||
USER_CONF="$APP_DIR/appsettings.$ENVIRONMENT.json"
|
USER_CONF="$APP_DIR/appsettings.$ENVIRONMENT.json"
|
||||||
NGINX_CONF="/etc/nginx/conf.d"
|
NGINX_DIR="/etc/nginx"
|
||||||
SYSTEMD_DIR="/etc/systemd/system"
|
NGINX_CONF="${NGINX_DIR}/conf.d"
|
||||||
|
SYSTEMD_DIR="/lib/systemd/system"
|
||||||
|
|
||||||
MYSQL=""
|
MYSQL=""
|
||||||
DB_HOST=""
|
DB_HOST=""
|
||||||
@ -167,7 +171,7 @@ install_json() {
|
|||||||
set_core_machinekey
|
set_core_machinekey
|
||||||
$JSON_USERCONF "this.core={'base-domain': \"$APP_HOST\", 'machinekey': \"$CORE_MACHINEKEY\" }" \
|
$JSON_USERCONF "this.core={'base-domain': \"$APP_HOST\", 'machinekey': \"$CORE_MACHINEKEY\" }" \
|
||||||
-e "this.urlshortener={ 'path': '../ASC.UrlShortener/index.js' }" -e "this.thumb={ 'path': '../ASC.Thumbnails/' }" \
|
-e "this.urlshortener={ 'path': '../ASC.UrlShortener/index.js' }" -e "this.thumb={ 'path': '../ASC.Thumbnails/' }" \
|
||||||
-e "this.socket={ 'path': '../ASC.Socket.IO/' }" >/dev/null 2>&1
|
-e "this.socket={ 'path': '../ASC.Socket.IO/' }" -e "this.ssoauth={ 'path': '../ASC.SsoAuth/' }" >/dev/null 2>&1
|
||||||
$JSON $APP_DIR/appsettings.json -e "this.core.products.subfolder='server'" >/dev/null 2>&1
|
$JSON $APP_DIR/appsettings.json -e "this.core.products.subfolder='server'" >/dev/null 2>&1
|
||||||
$JSON $APP_DIR/appsettings.services.json -e "this.core={ 'products': { 'folder': '../../products', 'subfolder': 'server'} }" >/dev/null 2>&1
|
$JSON $APP_DIR/appsettings.services.json -e "this.core={ 'products': { 'folder': '../../products', 'subfolder': 'server'} }" >/dev/null 2>&1
|
||||||
|
|
||||||
@ -177,21 +181,18 @@ install_json() {
|
|||||||
restart_services() {
|
restart_services() {
|
||||||
echo -n "Restarting services... "
|
echo -n "Restarting services... "
|
||||||
|
|
||||||
|
sed -i "s/Type=.*/Type=simple/" $SYSTEMD_DIR/${PRODUCT}-calendar.service >/dev/null 2>&1 #Fix non-start of service
|
||||||
sed -i "s/ENVIRONMENT=.*/ENVIRONMENT=$ENVIRONMENT/" $SYSTEMD_DIR/${PRODUCT}*.service >/dev/null 2>&1
|
sed -i "s/ENVIRONMENT=.*/ENVIRONMENT=$ENVIRONMENT/" $SYSTEMD_DIR/${PRODUCT}*.service >/dev/null 2>&1
|
||||||
systemctl daemon-reload
|
systemctl daemon-reload
|
||||||
|
|
||||||
for SVC in nginx mysqld ${PRODUCT}-api ${PRODUCT}-api-system ${PRODUCT}-urlshortener ${PRODUCT}-thumbnails \
|
for SVC in nginx ${MYSQL_PACKAGE} ${PRODUCT}-api ${PRODUCT}-api-system ${PRODUCT}-urlshortener ${PRODUCT}-thumbnails \
|
||||||
${PRODUCT}-socket ${PRODUCT}-studio-notify ${PRODUCT}-notify ${PRODUCT}-people-server ${PRODUCT}-files \
|
${PRODUCT}-socket ${PRODUCT}-studio-notify ${PRODUCT}-notify ${PRODUCT}-people-server ${PRODUCT}-files \
|
||||||
${PRODUCT}-files-services ${PRODUCT}-studio ${PRODUCT}-backup ${PRODUCT}-storage-encryption \
|
${PRODUCT}-files-services ${PRODUCT}-studio ${PRODUCT}-backup ${PRODUCT}-storage-encryption \
|
||||||
${PRODUCT}-storage-migration ${PRODUCT}-projects-server ${PRODUCT}-telegram-service ${PRODUCT}-crm \
|
${PRODUCT}-storage-migration ${PRODUCT}-projects-server ${PRODUCT}-telegram-service ${PRODUCT}-crm \
|
||||||
${PRODUCT}-calendar ${PRODUCT}-mail elasticsearch kafka zookeeper
|
${PRODUCT}-calendar ${PRODUCT}-mail elasticsearch kafka zookeeper
|
||||||
do
|
do
|
||||||
if systemctl is-active $SVC | grep -q "active"; then
|
|
||||||
systemctl restart $SVC.service >/dev/null 2>&1
|
|
||||||
else
|
|
||||||
systemctl enable $SVC.service >/dev/null 2>&1
|
systemctl enable $SVC.service >/dev/null 2>&1
|
||||||
systemctl start $SVC.service >/dev/null 2>&1
|
systemctl restart $SVC.service
|
||||||
fi
|
|
||||||
done
|
done
|
||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
@ -235,7 +236,7 @@ establish_mysql_conn(){
|
|||||||
$MYSQL -e ";" >/dev/null 2>&1
|
$MYSQL -e ";" >/dev/null 2>&1
|
||||||
ERRCODE=$?
|
ERRCODE=$?
|
||||||
if [ $ERRCODE -ne 0 ]; then
|
if [ $ERRCODE -ne 0 ]; then
|
||||||
systemctl mysqld start >/dev/null 2>&1
|
systemctl ${MYSQL_PACKAGE} start >/dev/null 2>&1
|
||||||
$MYSQL -e ";" >/dev/null 2>&1 || { echo "FAILURE"; exit 1; }
|
$MYSQL -e ";" >/dev/null 2>&1 || { echo "FAILURE"; exit 1; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -246,13 +247,9 @@ establish_mysql_conn(){
|
|||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
mysql_check_connection() {
|
|
||||||
while ! $MYSQL -e ";" >/dev/null 2>&1; do
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
change_mysql_config(){
|
change_mysql_config(){
|
||||||
|
if [ "$DIST" = "RedHat" ]; then
|
||||||
|
|
||||||
local CNF_PATH="/etc/my.cnf";
|
local CNF_PATH="/etc/my.cnf";
|
||||||
local CNF_SERVICE_PATH="/usr/lib/systemd/system/mysqld.service";
|
local CNF_SERVICE_PATH="/usr/lib/systemd/system/mysqld.service";
|
||||||
|
|
||||||
@ -276,6 +273,20 @@ change_mysql_config(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
elif [ "$DIST" = "Debian" ]; then
|
||||||
|
|
||||||
|
sed "s/#max_connections.*/max_connections = 1000/" -i /etc/mysql/my.cnf || true # ignore errors
|
||||||
|
|
||||||
|
CNF_PATH="/etc/mysql/mysql.conf.d/mysqld.cnf";
|
||||||
|
CNF_SERVICE_PATH="/lib/systemd/system/mysql.service";
|
||||||
|
|
||||||
|
if mysql -V | grep -q "MariaDB"; then
|
||||||
|
CNF_PATH="/etc/mysql/mariadb.conf.d/50-server.cnf";
|
||||||
|
CNF_SERVICE_PATH="/lib/systemd/system/mariadb.service";
|
||||||
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
sed '/skip-networking/d' -i ${CNF_PATH} || true # ignore errors
|
sed '/skip-networking/d' -i ${CNF_PATH} || true # ignore errors
|
||||||
|
|
||||||
if ! grep -q "^sql_mode" ${CNF_PATH}; then
|
if ! grep -q "^sql_mode" ${CNF_PATH}; then
|
||||||
@ -320,6 +331,8 @@ change_mysql_config(){
|
|||||||
sed "s/default-authentication-plugin.*/default-authentication-plugin = mysql_native_password/" -i ${CNF_PATH} || true # ignore errors
|
sed "s/default-authentication-plugin.*/default-authentication-plugin = mysql_native_password/" -i ${CNF_PATH} || true # ignore errors
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -e ${CNF_SERVICE_PATH} ]; then
|
||||||
|
|
||||||
if ! grep -q "^LimitNOFILE" ${CNF_SERVICE_PATH}; then
|
if ! grep -q "^LimitNOFILE" ${CNF_SERVICE_PATH}; then
|
||||||
sed '/\[Service\]/a LimitNOFILE = infinity' -i ${CNF_SERVICE_PATH}
|
sed '/\[Service\]/a LimitNOFILE = infinity' -i ${CNF_SERVICE_PATH}
|
||||||
else
|
else
|
||||||
@ -332,15 +345,19 @@ change_mysql_config(){
|
|||||||
sed "s/LimitMEMLOCK.*/LimitMEMLOCK = infinity/" -i ${CNF_SERVICE_PATH} || true # ignore errors
|
sed "s/LimitMEMLOCK.*/LimitMEMLOCK = infinity/" -i ${CNF_SERVICE_PATH} || true # ignore errors
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
systemctl daemon-reload >/dev/null 2>&1
|
systemctl daemon-reload >/dev/null 2>&1
|
||||||
systemctl restart mysqld >/dev/null 2>&1
|
systemctl restart ${MYSQL_PACKAGE} >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
execute_mysql_script(){
|
execute_mysql_script(){
|
||||||
|
|
||||||
change_mysql_config
|
change_mysql_config
|
||||||
|
|
||||||
mysql_check_connection
|
while ! $MYSQL -e ";" >/dev/null 2>&1; do
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
|
||||||
if [ "$DB_USER" = "root" ] && [ ! "$(mysql -V | grep ' 5.5.')" ]; then
|
if [ "$DB_USER" = "root" ] && [ ! "$(mysql -V | grep ' 5.5.')" ]; then
|
||||||
# allow connect via mysql_native_password with root and empty password
|
# allow connect via mysql_native_password with root and empty password
|
||||||
@ -356,7 +373,7 @@ execute_mysql_script(){
|
|||||||
echo -n "Installing MYSQL database... "
|
echo -n "Installing MYSQL database... "
|
||||||
|
|
||||||
#Adding data to the db
|
#Adding data to the db
|
||||||
sed -i -e '1 s/^/SET SQL_MODE='ALLOW_INVALID_DATES';\n/;' $SQL_DIR/onlyoffice.sql
|
sed -i -e '1 s/^/SET SQL_MODE='ALLOW_INVALID_DATES';\n/;' $SQL_DIR/onlyoffice.sql #Fix a bug related to an incorrect date
|
||||||
$MYSQL -e "CREATE DATABASE IF NOT EXISTS $DB_NAME CHARACTER SET utf8 COLLATE 'utf8_general_ci';" >/dev/null 2>&1
|
$MYSQL -e "CREATE DATABASE IF NOT EXISTS $DB_NAME CHARACTER SET utf8 COLLATE 'utf8_general_ci';" >/dev/null 2>&1
|
||||||
echo 'CREATE TABLE IF NOT EXISTS `Tenants` ( `id` varchar(200) NOT NULL, `Status` varchar(200) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;' >> $SQL_DIR/onlyoffice.sql #Fix non-existent tables Tenants
|
echo 'CREATE TABLE IF NOT EXISTS `Tenants` ( `id` varchar(200) NOT NULL, `Status` varchar(200) NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8;' >> $SQL_DIR/onlyoffice.sql #Fix non-existent tables Tenants
|
||||||
$MYSQL "$DB_NAME" < "$SQL_DIR/createdb.sql" >/dev/null 2>&1
|
$MYSQL "$DB_NAME" < "$SQL_DIR/createdb.sql" >/dev/null 2>&1
|
||||||
@ -378,10 +395,18 @@ execute_mysql_script(){
|
|||||||
setup_nginx(){
|
setup_nginx(){
|
||||||
echo -n "Configuring nginx... "
|
echo -n "Configuring nginx... "
|
||||||
|
|
||||||
mv -f $NGINX_CONF/default.conf $NGINX_CONF/default.conf.old >/dev/null 2>&1
|
# Remove default nginx website
|
||||||
|
rm -f $NGINX_CONF/default.conf >/dev/null 2>&1 || rm -f $NGINX_DIR/sites-enabled/default >/dev/null 2>&1
|
||||||
sed -i "s/listen.*;/listen $APP_PORT;/" $NGINX_CONF/onlyoffice.conf
|
sed -i "s/listen.*;/listen $APP_PORT;/" $NGINX_CONF/onlyoffice.conf
|
||||||
|
|
||||||
|
if [ "$DIST" = "RedHat" ]; then
|
||||||
|
# Remove default nginx settings
|
||||||
|
DELETION_LINE=$(sed -n '/server {/=' /etc/nginx/nginx.conf | head -n 1)
|
||||||
|
if [ -n "$DELETION_LINE" ]; then
|
||||||
|
sed "$DELETION_LINE,\$d" -i /etc/nginx/nginx.conf
|
||||||
|
echo "}" >> /etc/nginx/nginx.conf
|
||||||
|
fi
|
||||||
|
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
PORTS=()
|
PORTS=()
|
||||||
if $(getenforce) >/dev/null 2>&1; then
|
if $(getenforce) >/dev/null 2>&1; then
|
||||||
@ -407,6 +432,7 @@ setup_nginx(){
|
|||||||
true
|
true
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
chown nginx:nginx /etc/nginx/* -R
|
chown nginx:nginx /etc/nginx/* -R
|
||||||
sudo sed -e 's/#//' -i $NGINX_CONF/onlyoffice.conf
|
sudo sed -e 's/#//' -i $NGINX_CONF/onlyoffice.conf
|
||||||
echo "OK"
|
echo "OK"
|
||||||
@ -427,8 +453,8 @@ setup_docs() {
|
|||||||
$JSON_DSCONF "this.services.CoAuthoring.token.enable.request.inbox='true'" >/dev/null 2>&1
|
$JSON_DSCONF "this.services.CoAuthoring.token.enable.request.inbox='true'" >/dev/null 2>&1
|
||||||
$JSON_DSCONF "this.services.CoAuthoring.token.enable.request.outbox='true'" >/dev/null 2>&1
|
$JSON_DSCONF "this.services.CoAuthoring.token.enable.request.outbox='true'" >/dev/null 2>&1
|
||||||
|
|
||||||
local DOCUMENT_SERVER_JWT_SECRET=$(cat ${DS_CONF} | json services.CoAuthoring.secret.inbox.string)
|
local DOCUMENT_SERVER_JWT_SECRET=$(json -f ${DS_CONF} services.CoAuthoring.secret.inbox.string)
|
||||||
local DOCUMENT_SERVER_JWT_HEADER=$(cat ${DS_CONF} | json services.CoAuthoring.token.inbox.header)
|
local DOCUMENT_SERVER_JWT_HEADER=$(json -f ${DS_CONF} services.CoAuthoring.token.inbox.header)
|
||||||
|
|
||||||
#Save Docs address and JWT in .json
|
#Save Docs address and JWT in .json
|
||||||
$JSON_USERCONF "this.files={'docservice': {\
|
$JSON_USERCONF "this.files={'docservice': {\
|
||||||
@ -436,14 +462,16 @@ setup_docs() {
|
|||||||
'url': {'public': '/ds-vpath/','internal': \"http://${DOCUMENT_SERVER_HOST}:${DOCUMENT_SERVER_PORT}\",'portal': \"http://$APP_HOST:$APP_PORT\"}}}" >/dev/null 2>&1
|
'url': {'public': '/ds-vpath/','internal': \"http://${DOCUMENT_SERVER_HOST}:${DOCUMENT_SERVER_PORT}\",'portal': \"http://$APP_HOST:$APP_PORT\"}}}" >/dev/null 2>&1
|
||||||
|
|
||||||
#Enable ds-example autostart
|
#Enable ds-example autostart
|
||||||
sudo sed 's,autostart=false,autostart=true,' -i /etc/supervisord.d/ds-example.ini
|
sed 's,autostart=false,autostart=true,' -i /etc/supervisord.d/ds-example.ini >/dev/null 2>&1 || sed 's,autostart=false,autostart=true,' -i /etc/supervisor/conf.d/ds-example.conf >/dev/null 2>&1
|
||||||
sudo supervisorctl start ds:example >/dev/null 2>&1
|
supervisorctl start ds:example >/dev/null 2>&1
|
||||||
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
change_elasticsearch_config(){
|
change_elasticsearch_config(){
|
||||||
local ELASTIC_SEARCH_VERSION=$(rpm -qi elasticsearch | grep Version | tail -n1 | awk -F': ' '/Version/ {print $2}');
|
|
||||||
|
systemctl stop elasticsearch
|
||||||
|
|
||||||
local ELASTIC_SEARCH_CONF_PATH="/etc/elasticsearch/elasticsearch.yml"
|
local ELASTIC_SEARCH_CONF_PATH="/etc/elasticsearch/elasticsearch.yml"
|
||||||
local ELASTIC_SEARCH_JAVA_CONF_PATH="/etc/elasticsearch/jvm.options";
|
local ELASTIC_SEARCH_JAVA_CONF_PATH="/etc/elasticsearch/jvm.options";
|
||||||
|
|
||||||
@ -496,6 +524,8 @@ change_elasticsearch_config(){
|
|||||||
if [ -d /etc/elasticsearch/ ]; then
|
if [ -d /etc/elasticsearch/ ]; then
|
||||||
chmod g+ws /etc/elasticsearch/
|
chmod g+ws /etc/elasticsearch/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
systemctl start elasticsearch
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_elasticsearch() {
|
setup_elasticsearch() {
|
||||||
@ -511,13 +541,13 @@ setup_elasticsearch() {
|
|||||||
|
|
||||||
setup_kafka() {
|
setup_kafka() {
|
||||||
|
|
||||||
local KAFKA_SERVICE=$(systemctl --type=service | grep 'kafka' | tr -d '●' | awk '{print $1;}')
|
KAFKA_SERVICE=$(systemctl list-units --no-legend "*kafka*" | cut -f1 -d' ')
|
||||||
|
|
||||||
if [ -n ${KAFKA_SERVICE} ]; then
|
if [ -n ${KAFKA_SERVICE} ]; then
|
||||||
|
|
||||||
echo -n "Configuring kafka... "
|
echo -n "Configuring kafka... "
|
||||||
|
|
||||||
local KAFKA_DIR="$(cat $SYSTEMD_DIR/$KAFKA_SERVICE | grep ExecStop= | cut -c 10- | rev | cut -c 26- | rev)"
|
local KAFKA_DIR="$(grep -oP '(?<=ExecStop=).*(?=/bin)' $SYSTEMD_DIR/$KAFKA_SERVICE)"
|
||||||
local KAFKA_CONF="${KAFKA_DIR}/config"
|
local KAFKA_CONF="${KAFKA_DIR}/config"
|
||||||
|
|
||||||
#Change kafka config
|
#Change kafka config
|
||||||
@ -532,39 +562,42 @@ setup_kafka() {
|
|||||||
#Save kafka parameters in .json
|
#Save kafka parameters in .json
|
||||||
$JSON_USERCONF "this.kafka={'BootstrapServers': \"${KAFKA_HOST}:${KAFKA_PORT}\"}" >/dev/null 2>&1
|
$JSON_USERCONF "this.kafka={'BootstrapServers': \"${KAFKA_HOST}:${KAFKA_PORT}\"}" >/dev/null 2>&1
|
||||||
|
|
||||||
#Add topics for kafka
|
|
||||||
KAFKA_TOPICS=( ascchannelQuotaCacheItemAny
|
|
||||||
ascchannelTariffCacheItemRemove
|
|
||||||
ascchannelTenantCacheItemInsertOrUpdate
|
|
||||||
ascchannelTenantSettingRemove )
|
|
||||||
|
|
||||||
for i in "${KAFKA_TOPICS[@]}"
|
|
||||||
do
|
|
||||||
${KAFKA_DIR}/bin/kafka-topics.sh --create --zookeeper ${ZOOKEEPER_HOST}:${ZOOKEEPER_PORT} --topic $i --replication-factor 1 --partitions 3 >/dev/null 2>&1
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if command -v yum >/dev/null 2>&1; then
|
||||||
|
DIST="RedHat"
|
||||||
|
PACKAGE_MANAGER="rpm -q"
|
||||||
|
MYSQL_PACKAGE="mysqld"
|
||||||
|
elif command -v apt >/dev/null 2>&1; then
|
||||||
|
DIST="Debian"
|
||||||
|
PACKAGE_MANAGER="dpkg -l"
|
||||||
|
MYSQL_PACKAGE="mysql"
|
||||||
|
mkdir -p /var/log/onlyoffice/appserver/ /etc/onlyoffice/appserver/.private/
|
||||||
|
chown -R onlyoffice:onlyoffice /var/www/appserver/ /var/log/onlyoffice/appserver/ /etc/onlyoffice/appserver/
|
||||||
|
chown -R kafka /var/www/appserver/services/kafka/
|
||||||
|
systemctl restart kafka zookeeper
|
||||||
|
fi
|
||||||
|
|
||||||
install_json
|
install_json
|
||||||
|
|
||||||
if rpm -q mysql-community-client >/dev/null; then
|
if $PACKAGE_MANAGER mysql-client >/dev/null 2>&1 || $PACKAGE_MANAGER mysql-community-client >/dev/null 2>&1; then
|
||||||
input_db_params
|
input_db_params
|
||||||
establish_mysql_conn || exit $?
|
establish_mysql_conn || exit $?
|
||||||
execute_mysql_script || exit $?
|
execute_mysql_script || exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if rpm -q nginx >/dev/null; then
|
if $PACKAGE_MANAGER nginx >/dev/null 2>&1; then
|
||||||
setup_nginx
|
setup_nginx
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if rpm -q onlyoffice-documentserver >/dev/null || rpm -q onlyoffice-documentserver-de >/dev/null || rpm -q onlyoffice-documentserver-ee >/dev/null; then
|
if $PACKAGE_MANAGER onlyoffice-documentserver >/dev/null 2>&1 || $PACKAGE_MANAGER onlyoffice-documentserver-de >/dev/null 2>&1 || $PACKAGE_MANAGER onlyoffice-documentserver-ee >/dev/null 2>&1; then
|
||||||
setup_docs
|
setup_docs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if rpm -q elasticsearch >/dev/null; then
|
if $PACKAGE_MANAGER elasticsearch >/dev/null 2>&1; then
|
||||||
setup_elasticsearch
|
setup_elasticsearch
|
||||||
fi
|
fi
|
||||||
|
|
@ -60,6 +60,7 @@ SERVICE_NAME=(
|
|||||||
crm
|
crm
|
||||||
calendar
|
calendar
|
||||||
mail
|
mail
|
||||||
|
ssoauth
|
||||||
)
|
)
|
||||||
|
|
||||||
reassign_values (){
|
reassign_values (){
|
||||||
@ -163,6 +164,11 @@ reassign_values (){
|
|||||||
WORK_DIR="${BASE_DIR}/products/ASC.Mail/server/"
|
WORK_DIR="${BASE_DIR}/products/ASC.Mail/server/"
|
||||||
EXEC_FILE="ASC.Mail.dll"
|
EXEC_FILE="ASC.Mail.dll"
|
||||||
;;
|
;;
|
||||||
|
ssoauth )
|
||||||
|
SERVICE_PORT="9833"
|
||||||
|
WORK_DIR="${BASE_DIR}/services/ASC.SsoAuth.Svc/"
|
||||||
|
EXEC_FILE="ASC.SsoAuth.Svc.dll"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
SERVICE_NAME="$1"
|
SERVICE_NAME="$1"
|
||||||
EXEC_START="${DOTNET_RUN} ${WORK_DIR}${EXEC_FILE} --urls=${APP_URLS}:${SERVICE_PORT} --pathToConf=${PATH_TO_CONF} \
|
EXEC_START="${DOTNET_RUN} ${WORK_DIR}${EXEC_FILE} --urls=${APP_URLS}:${SERVICE_PORT} --pathToConf=${PATH_TO_CONF} \
|
||||||
|
1
build/install/deb/debian/appserver-api-system.install
Normal file
1
build/install/deb/debian/appserver-api-system.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.ApiSystem/service/* var/www/appserver/services/ASC.ApiSystem
|
1
build/install/deb/debian/appserver-api.install
Normal file
1
build/install/deb/debian/appserver-api.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.Web.Api/service/* var/www/appserver/studio/api
|
1
build/install/deb/debian/appserver-backup.install
Normal file
1
build/install/deb/debian/appserver-backup.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.Data.Backup/service/* var/www/appserver/services/ASC.Data.Backup
|
1
build/install/deb/debian/appserver-calendar.install
Normal file
1
build/install/deb/debian/appserver-calendar.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/products/ASC.Calendar/server var/www/appserver/products/ASC.Calendar
|
3
build/install/deb/debian/appserver-common.install
Normal file
3
build/install/deb/debian/appserver-common.install
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
../../../config/*.json etc/onlyoffice/appserver
|
||||||
|
../../../config/*.config etc/onlyoffice/appserver
|
||||||
|
../docker/config/*.sql var/www/appserver/sql
|
20
build/install/deb/debian/appserver-common.postinst
Normal file
20
build/install/deb/debian/appserver-common.postinst
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# see: dh_installdeb(1)
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if ! cat /etc/passwd | grep -q "onlyoffice:"; then
|
||||||
|
adduser --quiet --home /var/www/appserver --system --group onlyoffice
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! cat /etc/group | grep -q "nginx:"; then
|
||||||
|
addgroup --quiet --system nginx
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! cat /etc/passwd | grep -q "nginx:"; then
|
||||||
|
adduser --quiet --system nginx
|
||||||
|
usermod -aG nginx nginx
|
||||||
|
fi
|
||||||
|
|
||||||
|
usermod -aG onlyoffice,nginx onlyoffice
|
1
build/install/deb/debian/appserver-configuration.install
Normal file
1
build/install/deb/debian/appserver-configuration.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
../common/appserver-configuration.sh usr/bin
|
1
build/install/deb/debian/appserver-crm.install
Normal file
1
build/install/deb/debian/appserver-crm.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/products/ASC.CRM/server var/www/appserver/products/ASC.CRM
|
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.Files.Service/service var/www/appserver/products/ASC.Files
|
2
build/install/deb/debian/appserver-files.install
Normal file
2
build/install/deb/debian/appserver-files.install
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
src/var/www/products/ASC.Files/server var/www/appserver/products/ASC.Files
|
||||||
|
../../../products/ASC.Files/Server/DocStore var/www/appserver/products/ASC.Files/server
|
1
build/install/deb/debian/appserver-mail.install
Normal file
1
build/install/deb/debian/appserver-mail.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/products/ASC.Mail/server var/www/appserver/products/ASC.Mail
|
1
build/install/deb/debian/appserver-notify.install
Normal file
1
build/install/deb/debian/appserver-notify.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.Notify/service/* var/www/appserver/services/ASC.Notify
|
1
build/install/deb/debian/appserver-people-server.install
Normal file
1
build/install/deb/debian/appserver-people-server.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/products/ASC.People/server var/www/appserver/products/ASC.People
|
@ -0,0 +1 @@
|
|||||||
|
src/var/www/products/ASC.Projects/server var/www/appserver/products/ASC.Projects
|
17
build/install/deb/debian/appserver-proxy.install
Normal file
17
build/install/deb/debian/appserver-proxy.install
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
## COPY PUBLIC ##
|
||||||
|
../../../config/nginx/onlyoffice*.conf etc/nginx/conf.d
|
||||||
|
../../../config/nginx/includes/onlyoffice*.conf etc/nginx/includes
|
||||||
|
../../../public/* var/www/appserver/public
|
||||||
|
../../../public/images/* var/www/appserver/public/images
|
||||||
|
../../../public/offline/* var/www/appserver/public/offline
|
||||||
|
../../../public/thirdparty/* var/www/appserver/public/thirdparty
|
||||||
|
../../../products/ASC.Calendar/Client/dist/* var/www/appserver/products/ASC.Calendar/client
|
||||||
|
../../../products/ASC.CRM/Client/dist/* var/www/appserver/products/ASC.CRM/client
|
||||||
|
../../../products/ASC.Projects/Client/dist/* var/www/appserver/products/ASC.Projects/client
|
||||||
|
../../../products/ASC.Calendar/Client/dist/* var/www/appserver/products/ASC.Calendar/client
|
||||||
|
../../../products/ASC.People/Client/dist/* var/www/appserver/products/ASC.People/client
|
||||||
|
../../../products/ASC.Mail/Client/dist/* var/www/appserver/products/ASC.Mail/client
|
||||||
|
../../../products/ASC.Files/Client/dist/* var/www/appserver/products/ASC.Files/client
|
||||||
|
../../../web/ASC.Web.Editor/dist/* var/www/appserver/products/ASC.Files/editor
|
||||||
|
../../../web/ASC.Web.Client/dist/* var/www/appserver/studio/client
|
||||||
|
../../../web/ASC.Web.Login/dist/* var/www/appserver/studio/login
|
2
build/install/deb/debian/appserver-socket.install
Normal file
2
build/install/deb/debian/appserver-socket.install
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
src/var/www/services/ASC.Socket.IO/service/* var/www/appserver/services/ASC.Socket.IO
|
||||||
|
src/var/www/services/ASC.Socket.IO.Svc/service/* var/www/appserver/services/ASC.Socket.IO.Svc
|
2
build/install/deb/debian/appserver-ssoauth.install
Normal file
2
build/install/deb/debian/appserver-ssoauth.install
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
src/var/www/services/ASC.SsoAuth/service/* var/www/appserver/services/ASC.SsoAuth
|
||||||
|
src/var/www/services/ASC.SsoAuth.Svc/service/* var/www/appserver/services/ASC.SsoAuth.Svc
|
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.Data.Storage.Encryption/service/* var/www/appserver/services/ASC.Data.Storage.Encryption
|
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.Data.Storage.Migration/service/* var/www/appserver/services/ASC.Data.Storage.Migration
|
1
build/install/deb/debian/appserver-studio-notify.install
Normal file
1
build/install/deb/debian/appserver-studio-notify.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.Studio.Notify/service/* var/www/appserver/services/ASC.Studio.Notify
|
1
build/install/deb/debian/appserver-studio.install
Normal file
1
build/install/deb/debian/appserver-studio.install
Normal file
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.Web.Studio/service/* var/www/appserver/studio/server
|
@ -0,0 +1 @@
|
|||||||
|
src/var/www/services/ASC.TelegramService/service/* var/www/appserver/services/ASC.TelegramService
|
2
build/install/deb/debian/appserver-thumbnails.install
Normal file
2
build/install/deb/debian/appserver-thumbnails.install
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
src/var/www/services/ASC.Thumbnails.Svc/service/* var/www/appserver/services/ASC.Thumbnails.Svc
|
||||||
|
src/var/www/services/ASC.Thumbnails/service/* var/www/appserver/services/ASC.Thumbnails
|
2
build/install/deb/debian/appserver-urlshortener.install
Normal file
2
build/install/deb/debian/appserver-urlshortener.install
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
src/var/www/services/ASC.UrlShortener/service/* var/www/appserver/services/ASC.UrlShortener
|
||||||
|
src/var/www/services/ASC.UrlShortener.Svc/service/* var/www/appserver/services/ASC.UrlShortener.Svc
|
5
build/install/deb/debian/changelog
Normal file
5
build/install/deb/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
appserver (0.1-10) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Initial Release.
|
||||||
|
|
||||||
|
-- Ascensio System SIA <support@onlyoffice.com> Fri, 19 Mar 2021 18:39:30 +0300
|
1
build/install/deb/debian/compat
Normal file
1
build/install/deb/debian/compat
Normal file
@ -0,0 +1 @@
|
|||||||
|
9
|
3
build/install/deb/debian/configure
vendored
Executable file
3
build/install/deb/debian/configure
vendored
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
|
||||||
|
set -e
|
232
build/install/deb/debian/control
Normal file
232
build/install/deb/debian/control
Normal file
@ -0,0 +1,232 @@
|
|||||||
|
Source: appserver
|
||||||
|
Section: web
|
||||||
|
Priority: optional
|
||||||
|
Maintainer: onlyoffice
|
||||||
|
Build-Depends: debhelper (>= 10), nodejs (>=10), dotnet-sdk-5.0, yarn
|
||||||
|
Standards-Version: 0.1-10
|
||||||
|
Homepage: https://www.onlyoffice.com/
|
||||||
|
Architecture: any
|
||||||
|
|
||||||
|
Package: appserver
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-api-system,
|
||||||
|
appserver-backup,
|
||||||
|
appserver-calendar,
|
||||||
|
appserver-crm,
|
||||||
|
appserver-storage-encryption,
|
||||||
|
appserver-files,
|
||||||
|
appserver-files-services,
|
||||||
|
appserver-mail,
|
||||||
|
appserver-storage-migration,
|
||||||
|
appserver-notify,
|
||||||
|
appserver-people-server,
|
||||||
|
appserver-projects-server,
|
||||||
|
appserver-socket,
|
||||||
|
appserver-ssoauth,
|
||||||
|
appserver-studio-notify,
|
||||||
|
appserver-telegram-service,
|
||||||
|
appserver-thumbnails,
|
||||||
|
appserver-urlshortener,
|
||||||
|
appserver-api,
|
||||||
|
appserver-studio,
|
||||||
|
appserver-proxy
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-common
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-configuration
|
||||||
|
Architecture: any
|
||||||
|
Depends: ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-api-system
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-backup
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-calendar
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-crm
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-storage-encryption
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-files
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-files-services
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-mail
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-storage-migration
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-notify
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-people-server
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-projects-server
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-socket
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
nodejs (>=10),
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-studio-notify
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-telegram-service
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-thumbnails
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
nodejs (>=10),
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-urlshortener
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
nodejs (>=10),
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-api
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-studio
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-proxy
|
||||||
|
Architecture: any
|
||||||
|
Depends: nginx, ${misc:Depends}, ${shlibs:Depends}
|
||||||
|
Description: Description
|
||||||
|
|
||||||
|
Package: appserver-ssoauth
|
||||||
|
Architecture: any
|
||||||
|
Depends: appserver-common,
|
||||||
|
appserver-configuration,
|
||||||
|
dotnet-sdk-5.0,
|
||||||
|
nodejs (>=10),
|
||||||
|
${misc:Depends},
|
||||||
|
${shlibs:Depends}
|
||||||
|
Description: Description
|
34
build/install/deb/debian/copyright
Normal file
34
build/install/deb/debian/copyright
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||||
|
Upstream-Name: ONLYOFFICE-AppServer
|
||||||
|
Source: http://onlyoffice.com
|
||||||
|
|
||||||
|
Files: *
|
||||||
|
Copyright: (c) Copyright Ascensio System SIA, 2021 support@onlyoffice.com
|
||||||
|
|
||||||
|
License: AGPLv3
|
||||||
|
This program is a free software product. You can redistribute it and/or
|
||||||
|
modify it under the terms of the GNU Affero General Public License (AGPL)
|
||||||
|
version 3 as published by the Free Software Foundation. In accordance with
|
||||||
|
Section 7(a) of the GNU AGPL its Section 15 shall be amended to the effect
|
||||||
|
that Ascensio System SIA expressly excludes the warranty of non-infringement
|
||||||
|
of any third-party rights.
|
||||||
|
|
||||||
|
This program is distributed WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For
|
||||||
|
details, see the GNU AGPL at: http://www.gnu.org/licenses/agpl-3.0.html
|
||||||
|
|
||||||
|
You can contact Ascensio System SIA at Lubanas st. 125a-25, Riga, Latvia,
|
||||||
|
EU, LV-1021.
|
||||||
|
|
||||||
|
The interactive user interfaces in modified source and object code versions
|
||||||
|
of the Program must display Appropriate Legal Notices, as required under
|
||||||
|
Section 5 of the GNU AGPL version 3.
|
||||||
|
|
||||||
|
Pursuant to Section 7(b) of the License you must retain the original Product
|
||||||
|
logo when distributing the program. Pursuant to Section 7(e) we decline to
|
||||||
|
grant you any rights under trademark law for use of our trademarks.
|
||||||
|
|
||||||
|
All the Product's GUI elements, including illustrations and icon sets, as
|
||||||
|
well as technical writing content are licensed under the terms of the
|
||||||
|
Creative Commons Attribution-ShareAlike 4.0 International. See the License
|
||||||
|
terms at http://creativecommons.org/licenses/by-sa/4.0/legalcode
|
48
build/install/deb/debian/rules
Executable file
48
build/install/deb/debian/rules
Executable file
@ -0,0 +1,48 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
# -*- makefile -*-
|
||||||
|
|
||||||
|
# Uncomment this to turn on verbose mode.
|
||||||
|
export DH_VERBOSE=1
|
||||||
|
export DH_OPTIONS=-v
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with=systemd
|
||||||
|
|
||||||
|
PRODUCT=appserver
|
||||||
|
CURRENT_PATH=${CURDIR}
|
||||||
|
BUILD_PATH=var/www
|
||||||
|
SRC_PATH=$(shell cd ../../../; pwd)
|
||||||
|
SCRIPT_PATH=build/install/common
|
||||||
|
|
||||||
|
override_dh_auto_clean:
|
||||||
|
@echo "RULES.$@"
|
||||||
|
dh_testdir
|
||||||
|
rm -rf ${CURRENT_PATH}/src
|
||||||
|
rm -rf ${CURRENT_PATH}/debian/*.service
|
||||||
|
rm -rf ${SRC_PATH}/build/install/${PRODUCT}*
|
||||||
|
|
||||||
|
override_dh_auto_configure:
|
||||||
|
@echo "RULES.$@"
|
||||||
|
dh_testdir
|
||||||
|
dh_auto_configure
|
||||||
|
|
||||||
|
override_dh_auto_build:
|
||||||
|
mkdir -p ${CURRENT_PATH}/src/${BUILD_PATH}
|
||||||
|
cd ${SRC_PATH}/${SCRIPT_PATH}/systemd; \
|
||||||
|
bash build.sh -bp "${CURRENT_PATH}/debian/"; \
|
||||||
|
cd ${SRC_PATH}/${SCRIPT_PATH}; \
|
||||||
|
bash build-frontend.sh -sp ${SRC_PATH}; \
|
||||||
|
bash build-backend.sh -sp ${SRC_PATH}; \
|
||||||
|
bash publish-backend.sh -sp ${SRC_PATH} -bp ${CURRENT_PATH}/src/${BUILD_PATH}
|
||||||
|
|
||||||
|
sed -i "s@var/www@var/www/${PRODUCT}@g" ${SRC_PATH}/config/nginx/*.conf
|
||||||
|
sed -i "s@var/www@var/www/${PRODUCT}@g" ${SRC_PATH}/config/nginx/includes/*.conf
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
dh_installinit
|
||||||
|
|
||||||
|
override_dh_strip:
|
||||||
|
# dh_strip --exclude=/site-packages/
|
||||||
|
|
||||||
|
override_dh_shlibdeps:
|
||||||
|
# dh_shlibdeps --exclude=/site-packages/
|
39
build/install/deb/debian/templates
Normal file
39
build/install/deb/debian/templates
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
Template: appserver/db-host
|
||||||
|
Type: string
|
||||||
|
Default: localhost
|
||||||
|
Description: MySQL host:
|
||||||
|
|
||||||
|
Template: appserver/db-user
|
||||||
|
Type: string
|
||||||
|
Default: root
|
||||||
|
Description: MySQL user:
|
||||||
|
|
||||||
|
Template: appserver/db-pwd
|
||||||
|
Type: password
|
||||||
|
Description: MySQL password:
|
||||||
|
|
||||||
|
Template: appserver/db-name
|
||||||
|
Type: string
|
||||||
|
Default: onlyoffice
|
||||||
|
Description: MySQL database name:
|
||||||
|
|
||||||
|
Template: appserver/remove-db
|
||||||
|
Type: boolean
|
||||||
|
Default: false
|
||||||
|
Description: Remove database?
|
||||||
|
This operation will remove the database which contain all data. It is recommended to take backup before removing the database.
|
||||||
|
|
||||||
|
Template: appserver/ds-jwt-enabled
|
||||||
|
Type: boolean
|
||||||
|
Default: false
|
||||||
|
Description: To enabled Document Server JWT?:
|
||||||
|
|
||||||
|
Template: appserver/ds-jwt-secret
|
||||||
|
Type: string
|
||||||
|
Default: {{package_sysname}}
|
||||||
|
Description: Document Server JWT Secret:
|
||||||
|
|
||||||
|
Template: appserver/ds-jwt-secret-header
|
||||||
|
Type: string
|
||||||
|
Default: AuthorizationJwt
|
||||||
|
Description: Document Server Secret Header:
|
@ -32,6 +32,7 @@ Requires: %name-notify
|
|||||||
Requires: %name-people-server
|
Requires: %name-people-server
|
||||||
Requires: %name-projects-server
|
Requires: %name-projects-server
|
||||||
Requires: %name-socket
|
Requires: %name-socket
|
||||||
|
Requires: %name-ssoauth
|
||||||
Requires: %name-studio-notify
|
Requires: %name-studio-notify
|
||||||
Requires: %name-telegram-service
|
Requires: %name-telegram-service
|
||||||
Requires: %name-thumbnails
|
Requires: %name-thumbnails
|
||||||
|
@ -4,6 +4,6 @@ bash build/install/common/systemd/build.sh
|
|||||||
|
|
||||||
bash build/install/common/build-frontend.sh --srcpath %{_builddir}/%{sourcename}
|
bash build/install/common/build-frontend.sh --srcpath %{_builddir}/%{sourcename}
|
||||||
bash build/install/common/build-backend.sh --srcpath %{_builddir}/%{sourcename}
|
bash build/install/common/build-backend.sh --srcpath %{_builddir}/%{sourcename}
|
||||||
bash build/install/common/publish-backend.sh --srcpath %{_builddir}/%{sourcename} --arguments "--disable-parallel"
|
bash build/install/common/publish-backend.sh --srcpath %{_builddir}/%{sourcename}
|
||||||
|
|
||||||
sed -i "s@var/www@var/www/%{product}@" config/nginx/onlyoffice-*.conf && sed -i "s@var/www@var/www/%{product}@" config/nginx/includes/onlyoffice-*.conf
|
sed -i "s@var/www@var/www/%{product}@g" config/nginx/*.conf && sed -i "s@var/www@var/www/%{product}@g" config/nginx/includes/*.conf
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-api.service
|
/lib/systemd/system/%{product}-api.service
|
||||||
%dir %{buildpath}/studio/
|
%dir %{buildpath}/studio/
|
||||||
%dir %{buildpath}/products/ASC.People/
|
%dir %{buildpath}/products/ASC.People/
|
||||||
%dir %{buildpath}/products/ASC.People/server/
|
%dir %{buildpath}/products/ASC.People/server/
|
||||||
@ -26,7 +26,7 @@
|
|||||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-backup.service
|
/lib/systemd/system/%{product}-backup.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.People/
|
%dir %{buildpath}/products/ASC.People/
|
||||||
@ -53,7 +53,7 @@
|
|||||||
%{buildpath}/products/ASC.People/server/ASC.People*.dll
|
%{buildpath}/products/ASC.People/server/ASC.People*.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-files-services.service
|
/lib/systemd/system/%{product}-files-services.service
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.People/
|
%dir %{buildpath}/products/ASC.People/
|
||||||
%dir %{buildpath}/products/ASC.People/server
|
%dir %{buildpath}/products/ASC.People/server
|
||||||
@ -71,7 +71,7 @@
|
|||||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-notify.service
|
/lib/systemd/system/%{product}-notify.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.People/
|
%dir %{buildpath}/products/ASC.People/
|
||||||
@ -89,7 +89,7 @@
|
|||||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-files.service
|
/lib/systemd/system/%{product}-files.service
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.Files/
|
%dir %{buildpath}/products/ASC.Files/
|
||||||
%dir %{buildpath}/products/ASC.People/
|
%dir %{buildpath}/products/ASC.People/
|
||||||
@ -102,7 +102,7 @@
|
|||||||
%files api-system
|
%files api-system
|
||||||
%defattr(-, onlyoffice, onlyoffice, -)
|
%defattr(-, onlyoffice, onlyoffice, -)
|
||||||
%{buildpath}/services/ASC.ApiSystem/
|
%{buildpath}/services/ASC.ApiSystem/
|
||||||
%{_sysconfdir}/systemd/system/%{product}-api-system.service
|
/lib/systemd/system/%{product}-api-system.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
|
|
||||||
%files proxy
|
%files proxy
|
||||||
@ -111,14 +111,14 @@
|
|||||||
%{_sysconfdir}/nginx/conf.d/*
|
%{_sysconfdir}/nginx/conf.d/*
|
||||||
%{buildpath}/public/
|
%{buildpath}/public/
|
||||||
%{buildpath}/studio/client/
|
%{buildpath}/studio/client/
|
||||||
%{buildpath}/studio/login
|
%{buildpath}/studio/login/
|
||||||
%{buildpath}/products/ASC.People/client/
|
%{buildpath}/products/ASC.People/client/
|
||||||
%{buildpath}/products/ASC.Files/client/
|
%{buildpath}/products/ASC.Files/client/
|
||||||
%{buildpath}/products/ASC.Files/editor/
|
%{buildpath}/products/ASC.Files/editor/
|
||||||
%{buildpath}/products/ASC.CRM/client/
|
%{buildpath}/products/ASC.CRM/client/
|
||||||
%{buildpath}/products/ASC.Projects/client
|
%{buildpath}/products/ASC.Projects/client/
|
||||||
%{buildpath}/products/ASC.Calendar/client/
|
%{buildpath}/products/ASC.Calendar/client/
|
||||||
%{buildpath}/products/ASC.Mail/client
|
%{buildpath}/products/ASC.Mail/client/
|
||||||
%dir %{buildpath}/studio/
|
%dir %{buildpath}/studio/
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.People/
|
%dir %{buildpath}/products/ASC.People/
|
||||||
@ -135,7 +135,7 @@
|
|||||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-studio-notify.service
|
/lib/systemd/system/%{product}-studio-notify.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.People/
|
%dir %{buildpath}/products/ASC.People/
|
||||||
@ -153,7 +153,7 @@
|
|||||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-people-server.service
|
/lib/systemd/system/%{product}-people-server.service
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.People/
|
%dir %{buildpath}/products/ASC.People/
|
||||||
%dir %{buildpath}/products/ASC.Files/
|
%dir %{buildpath}/products/ASC.Files/
|
||||||
@ -167,25 +167,25 @@
|
|||||||
%defattr(-, onlyoffice, onlyoffice, -)
|
%defattr(-, onlyoffice, onlyoffice, -)
|
||||||
%{buildpath}/services/ASC.UrlShortener/
|
%{buildpath}/services/ASC.UrlShortener/
|
||||||
%{buildpath}/services/ASC.UrlShortener.Svc/
|
%{buildpath}/services/ASC.UrlShortener.Svc/
|
||||||
%{_sysconfdir}/systemd/system/%{product}-urlshortener.service
|
/lib/systemd/system/%{product}-urlshortener.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
|
|
||||||
%files thumbnails
|
%files thumbnails
|
||||||
%defattr(-, onlyoffice, onlyoffice, -)
|
%defattr(-, onlyoffice, onlyoffice, -)
|
||||||
%{buildpath}/services/ASC.Thumbnails/
|
%{buildpath}/services/ASC.Thumbnails/
|
||||||
%{buildpath}/services/ASC.Thumbnails.Svc/
|
%{buildpath}/services/ASC.Thumbnails.Svc/
|
||||||
%{_sysconfdir}/systemd/system/%{product}-thumbnails.service
|
/lib/systemd/system/%{product}-thumbnails.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
|
|
||||||
%files socket
|
%files socket
|
||||||
%defattr(-, onlyoffice, onlyoffice, -)
|
%defattr(-, onlyoffice, onlyoffice, -)
|
||||||
%{buildpath}/services/ASC.Socket.IO/
|
%{buildpath}/services/ASC.Socket.IO/
|
||||||
%{buildpath}/services/ASC.Socket.IO.Svc/
|
%{buildpath}/services/ASC.Socket.IO.Svc/
|
||||||
%{buildpath}/products/ASC.Files/server/
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.People/server/
|
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-socket.service
|
/lib/systemd/system/%{product}-socket.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.Files/
|
%dir %{buildpath}/products/ASC.Files/
|
||||||
@ -200,7 +200,7 @@
|
|||||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-studio.service
|
/lib/systemd/system/%{product}-studio.service
|
||||||
%dir %{buildpath}/studio/
|
%dir %{buildpath}/studio/
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.People/
|
%dir %{buildpath}/products/ASC.People/
|
||||||
@ -219,7 +219,7 @@
|
|||||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-storage-encryption.service
|
/lib/systemd/system/%{product}-storage-encryption.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.Files/
|
%dir %{buildpath}/products/ASC.Files/
|
||||||
@ -234,11 +234,11 @@
|
|||||||
%files storage-migration
|
%files storage-migration
|
||||||
%defattr(-, onlyoffice, onlyoffice, -)
|
%defattr(-, onlyoffice, onlyoffice, -)
|
||||||
%{buildpath}/services/ASC.Data.Storage.Migration/
|
%{buildpath}/services/ASC.Data.Storage.Migration/
|
||||||
%{buildpath}/products/ASC.Files/server/
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.People/server/
|
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-storage-migration.service
|
/lib/systemd/system/%{product}-storage-migration.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.Files/
|
%dir %{buildpath}/products/ASC.Files/
|
||||||
@ -252,7 +252,7 @@
|
|||||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-projects-server.service
|
/lib/systemd/system/%{product}-projects-server.service
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.Files/
|
%dir %{buildpath}/products/ASC.Files/
|
||||||
%dir %{buildpath}/products/ASC.Files/server/
|
%dir %{buildpath}/products/ASC.Files/server/
|
||||||
@ -269,7 +269,7 @@
|
|||||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||||
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
%{buildpath}/products/ASC.CRM/server/ASC.CRM*.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-telegram-service.service
|
/lib/systemd/system/%{product}-telegram-service.service
|
||||||
%dir %{buildpath}/services/
|
%dir %{buildpath}/services/
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.Files/
|
%dir %{buildpath}/products/ASC.Files/
|
||||||
@ -287,7 +287,7 @@
|
|||||||
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
%{buildpath}/products/ASC.Files/server/ASC.Files*.dll
|
||||||
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
%{buildpath}/products/ASC.People/server/ASC.People.dll
|
||||||
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
%{buildpath}/products/ASC.Projects/server/ASC.Projects*.dll
|
||||||
%{_sysconfdir}/systemd/system/%{product}-crm.service
|
/lib/systemd/system/%{product}-crm.service
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.CRM/
|
%dir %{buildpath}/products/ASC.CRM/
|
||||||
%dir %{buildpath}/products/ASC.Files/
|
%dir %{buildpath}/products/ASC.Files/
|
||||||
@ -298,13 +298,20 @@
|
|||||||
%files calendar
|
%files calendar
|
||||||
%defattr(-, onlyoffice, onlyoffice, -)
|
%defattr(-, onlyoffice, onlyoffice, -)
|
||||||
%{buildpath}/products/ASC.Calendar/server/
|
%{buildpath}/products/ASC.Calendar/server/
|
||||||
%{_sysconfdir}/systemd/system/%{product}-calendar.service
|
/lib/systemd/system/%{product}-calendar.service
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.Calendar/
|
%dir %{buildpath}/products/ASC.Calendar/
|
||||||
|
|
||||||
%files mail
|
%files mail
|
||||||
%defattr(-, onlyoffice, onlyoffice, -)
|
%defattr(-, onlyoffice, onlyoffice, -)
|
||||||
%{buildpath}/products/ASC.Mail/server/
|
%{buildpath}/products/ASC.Mail/server/
|
||||||
%{_sysconfdir}/systemd/system/%{product}-mail.service
|
/lib/systemd/system/%{product}-mail.service
|
||||||
%dir %{buildpath}/products/
|
%dir %{buildpath}/products/
|
||||||
%dir %{buildpath}/products/ASC.Mail/
|
%dir %{buildpath}/products/ASC.Mail/
|
||||||
|
|
||||||
|
%files ssoauth
|
||||||
|
%defattr(-, onlyoffice, onlyoffice, -)
|
||||||
|
%{buildpath}/services/ASC.SsoAuth/
|
||||||
|
%{buildpath}/services/ASC.SsoAuth.Svc/
|
||||||
|
/lib/systemd/system/%{product}-ssoauth.service
|
||||||
|
%dir %{buildpath}/services/
|
||||||
|
@ -5,8 +5,8 @@ mkdir -p "%{buildroot}%{_sysconfdir}/nginx/includes/"
|
|||||||
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
|
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
|
||||||
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/.private/"
|
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/.private/"
|
||||||
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/data/"
|
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/data/"
|
||||||
mkdir -p "%{buildroot}%{_sysconfdir}/systemd/system/"
|
|
||||||
mkdir -p "%{buildroot}%{_var}/log/onlyoffice/%{product}/"
|
mkdir -p "%{buildroot}%{_var}/log/onlyoffice/%{product}/"
|
||||||
|
mkdir -p "%{buildroot}/lib/systemd/system/"
|
||||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Calendar/client/"
|
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Calendar/client/"
|
||||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Calendar/server/"
|
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Calendar/server/"
|
||||||
mkdir -p "%{buildroot}%{buildpath}/products/ASC.CRM/client/"
|
mkdir -p "%{buildroot}%{buildpath}/products/ASC.CRM/client/"
|
||||||
@ -24,6 +24,8 @@ mkdir -p "%{buildroot}%{buildpath}/products/ASC.Projects/server/"
|
|||||||
mkdir -p "%{buildroot}%{buildpath}/public/"
|
mkdir -p "%{buildroot}%{buildpath}/public/"
|
||||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Socket.IO/"
|
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Socket.IO/"
|
||||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Socket.IO.Svc/"
|
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Socket.IO.Svc/"
|
||||||
|
mkdir -p "%{buildroot}%{buildpath}/services/ASC.SsoAuth/"
|
||||||
|
mkdir -p "%{buildroot}%{buildpath}/services/ASC.SsoAuth.Svc/"
|
||||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.ApiSystem/"
|
mkdir -p "%{buildroot}%{buildpath}/services/ASC.ApiSystem/"
|
||||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Data.Backup/"
|
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Data.Backup/"
|
||||||
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Notify/"
|
mkdir -p "%{buildroot}%{buildpath}/services/ASC.Notify/"
|
||||||
@ -52,6 +54,8 @@ cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Data.Backup/service/* "%{
|
|||||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Notify/service/* "%{buildroot}%{buildpath}/services/ASC.Notify/"
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Notify/service/* "%{buildroot}%{buildpath}/services/ASC.Notify/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Socket.IO/service/* "%{buildroot}%{buildpath}/services/ASC.Socket.IO/"
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Socket.IO/service/* "%{buildroot}%{buildpath}/services/ASC.Socket.IO/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Socket.IO.Svc/service/* "%{buildroot}%{buildpath}/services/ASC.Socket.IO.Svc/"
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Socket.IO.Svc/service/* "%{buildroot}%{buildpath}/services/ASC.Socket.IO.Svc/"
|
||||||
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.SsoAuth/service/* "%{buildroot}%{buildpath}/services/ASC.SsoAuth/"
|
||||||
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.SsoAuth.Svc/service/* "%{buildroot}%{buildpath}/services/ASC.SsoAuth.Svc/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Data.Storage.Encryption/service/* "%{buildroot}%{buildpath}/services/ASC.Data.Storage.Encryption/"
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Data.Storage.Encryption/service/* "%{buildroot}%{buildpath}/services/ASC.Data.Storage.Encryption/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Data.Storage.Migration/service/* "%{buildroot}%{buildpath}/services/ASC.Data.Storage.Migration/"
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Data.Storage.Migration/service/* "%{buildroot}%{buildpath}/services/ASC.Data.Storage.Migration/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Studio.Notify/service/* "%{buildroot}%{buildpath}/services/ASC.Studio.Notify/"
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Studio.Notify/service/* "%{buildroot}%{buildpath}/services/ASC.Studio.Notify/"
|
||||||
@ -62,9 +66,9 @@ cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.UrlShortener/service/* "%
|
|||||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.UrlShortener.Svc/service/* "%{buildroot}%{buildpath}/services/ASC.UrlShortener.Svc/"
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.UrlShortener.Svc/service/* "%{buildroot}%{buildpath}/services/ASC.UrlShortener.Svc/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Web.Api/service/* "%{buildroot}%{buildpath}/studio/api/"
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Web.Api/service/* "%{buildroot}%{buildpath}/studio/api/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Web.Studio/service/* "%{buildroot}%{buildpath}/studio/server/"
|
cp -rf %{_builddir}/%{sourcename}/publish/services/ASC.Web.Studio/service/* "%{buildroot}%{buildpath}/studio/server/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/build/install/common/systemd/modules/* "%{buildroot}%{_sysconfdir}/systemd/system/"
|
cp -rf %{_builddir}/%{sourcename}/build/install/common/systemd/modules/* "%{buildroot}/lib/systemd/system/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/build/install/docker/config/*.sql "%{buildroot}%{buildpath}/sql/"
|
cp -rf %{_builddir}/%{sourcename}/build/install/docker/config/*.sql "%{buildroot}%{buildpath}/sql/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/build/install/rpm/*.sh "%{buildroot}%{_bindir}/"
|
cp -rf %{_builddir}/%{sourcename}/build/install/common/%{product}-configuration.sh "%{buildroot}%{_bindir}/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/config/* "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
|
cp -rf %{_builddir}/%{sourcename}/config/* "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/config/nginx/includes/onlyoffice*.conf "%{buildroot}%{_sysconfdir}/nginx/includes/"
|
cp -rf %{_builddir}/%{sourcename}/config/nginx/includes/onlyoffice*.conf "%{buildroot}%{_sysconfdir}/nginx/includes/"
|
||||||
cp -rf %{_builddir}/%{sourcename}/config/nginx/onlyoffice*.conf "%{buildroot}%{_sysconfdir}/nginx/conf.d/"
|
cp -rf %{_builddir}/%{sourcename}/config/nginx/onlyoffice*.conf "%{buildroot}%{_sysconfdir}/nginx/conf.d/"
|
||||||
|
@ -166,3 +166,12 @@ Requires: %name-common
|
|||||||
Requires: dotnet-sdk-5.0
|
Requires: dotnet-sdk-5.0
|
||||||
AutoReqProv: no
|
AutoReqProv: no
|
||||||
%description mail
|
%description mail
|
||||||
|
|
||||||
|
%package ssoauth
|
||||||
|
Summary: ssoauth
|
||||||
|
Group: Applications/Internet
|
||||||
|
Requires: %name-common
|
||||||
|
Requires: dotnet-sdk-5.0
|
||||||
|
Requires: nodejs >= 12.0
|
||||||
|
AutoReqProv: no
|
||||||
|
%description ssoauth
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 8177bad15d567d997a79478a65d32662a6f773b1
|
Subproject commit b1063eae56d183b5c0b6eb887115c378f3941ebe
|
Loading…
Reference in New Issue
Block a user