DocSpace-buildtools/build/install/OneClickInstall/install-Debian/check-ports.sh
Evgeniy Antonyuk 23436472ed
Add new services and rebranding in packages\scripts (#786)
* Add new services, delete old services and kafka

* Corrections to appserver-configuration script

* Download the get-php script depending on the version of py

* Add doceditor and migration-runner services

* Docspace rebranding

* Rename a spec file

* Update build.sh

* Fixes in proxy package

* Rename script

* Fix launch of node js services

* Edit connection strings in migration-runner service

* Fix minor errors

* Update docspace-configuration.sh

* Update docspace-configuration.sh

* Add configuration of redis and rabbitmq services, as well as minor bug fixes

* Correct redis configuration

* Rebrand and add new services for deb package

* Fix build directory for deb package

* Revert "Fix build directory for deb package"

This reverts commit 9c711fc735c57e154e6b818988384d4b7e60c338.

* Add postinst for radicale package

* Fix python dependency

* Fix errors in control file

* Fix errors when building a deb package

* Update rules

* Rebranding of installation scripts

* Update build.spec

* Add migration for Docs Database

Co-authored-by: Alexey Golubev <alexey.golubev@onlyoffice.com>
2022-09-01 21:10:34 +03:00

40 lines
1.1 KiB
Bash

#!/bin/bash
set -e
cat<<EOF
#######################################
# CHECK PORTS
#######################################
EOF
if dpkg -l | grep -q "${product}"; then
echo "${product} $RES_APP_INSTALLED"
PRODUCT_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
PRODUCT_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 [ "$PRODUCT_INSTALLED" = "true" ] || [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then
if [ "$UPDATE" != "true" ]; then
exit;
fi
fi