diff --git a/install/OneClickInstall/install-Debian.sh b/install/OneClickInstall/install-Debian.sh index 206f89e5bb..b03c4d7a5a 100644 --- a/install/OneClickInstall/install-Debian.sh +++ b/install/OneClickInstall/install-Debian.sh @@ -106,7 +106,7 @@ while [ "$1" != "" ]; do -? | -h | --help ) echo " Usage $0 [PARAMETER] [[PARAMETER], ...]" echo " Parameters:" - echo " -it, --installation_type installation type (community|enterprise)" + echo " -it, --installation_type installation type (community|development|enterprise)" echo " -u, --update use to update existing components (true|false)" echo " -je, --jwtenabled specifies the enabling the JWT validation (true|false)" echo " -jh, --jwtheader defines the http header that will be used to send the JWT" diff --git a/install/OneClickInstall/install-Debian/install-app.sh b/install/OneClickInstall/install-Debian/install-app.sh index 9427847a31..a699ba4705 100644 --- a/install/OneClickInstall/install-Debian/install-app.sh +++ b/install/OneClickInstall/install-Debian/install-app.sh @@ -14,11 +14,11 @@ apt-get -y update if [ "$UPDATE" = "true" ] && [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then ds_pkg_installed_name=$(dpkg -l | grep ${package_sysname}-documentserver | tail -n1 | awk '{print $2}'); - if [ "$INSTALLATION_TYPE" = "COMMUNITY" ]; then - ds_pkg_name="${package_sysname}-documentserver"; - elif [ "$INSTALLATION_TYPE" = "ENTERPRISE" ]; then - ds_pkg_name="${package_sysname}-documentserver-ee"; - fi + ds_pkg_name="${package_sysname}-documentserver" + case "${INSTALLATION_TYPE}" in + "DEVELOPMENT") ds_pkg_name+="-de" ;; + "ENTERPRISE") ds_pkg_name+="-ee" ;; + esac if [ -n $ds_pkg_name ]; then if ! dpkg -l ${ds_pkg_name} &> /dev/null; then diff --git a/install/OneClickInstall/install-Docker.sh b/install/OneClickInstall/install-Docker.sh index 475bba4e24..2588bc5a3c 100644 --- a/install/OneClickInstall/install-Docker.sh +++ b/install/OneClickInstall/install-Docker.sh @@ -515,7 +515,7 @@ while [ "$1" != "" ]; do echo " -hub, --hub dockerhub name" echo " -un, --username dockerhub username" echo " -p, --password dockerhub password" - echo " -it, --installation_type installation type (community|enterprise)" + echo " -it, --installation_type installation type (community|development|enterprise)" echo " -skiphc, --skiphardwarecheck skip hardware check (true|false)" echo " -u, --update use to update existing components (true|false)" echo " -ids, --installdocspace install or update $PRODUCT (true|false)" @@ -1127,10 +1127,12 @@ set_docspace_params() { } set_installation_type_data () { - if [ "$INSTALLATION_TYPE" == "COMMUNITY" ]; then - DOCUMENT_SERVER_IMAGE_NAME=${DOCUMENT_SERVER_IMAGE_NAME:-"${PACKAGE_SYSNAME}/${STATUS}documentserver"} - elif [ "$INSTALLATION_TYPE" == "ENTERPRISE" ]; then - DOCUMENT_SERVER_IMAGE_NAME=${DOCUMENT_SERVER_IMAGE_NAME:-"${PACKAGE_SYSNAME}/${STATUS}documentserver-ee"} + if [ -z "${DOCUMENT_SERVER_IMAGE_NAME}" ]; then + DOCUMENT_SERVER_IMAGE_NAME="${PACKAGE_SYSNAME}/${STATUS}documentserver" + case "${INSTALLATION_TYPE}" in + "DEVELOPMENT") DOCUMENT_SERVER_IMAGE_NAME+="-de" ;; + "ENTERPRISE") DOCUMENT_SERVER_IMAGE_NAME+="-ee" ;; + esac fi } diff --git a/install/OneClickInstall/install-RedHat.sh b/install/OneClickInstall/install-RedHat.sh index 31597e6465..a50f86398e 100644 --- a/install/OneClickInstall/install-RedHat.sh +++ b/install/OneClickInstall/install-RedHat.sh @@ -115,7 +115,7 @@ while [ "$1" != "" ]; do -? | -h | --help ) echo " Usage $0 [PARAMETER] [[PARAMETER], ...]" echo " Parameters:" - echo " -it, --installation_type installation type (community|enterprise)" + echo " -it, --installation_type installation type (community|development|enterprise)" echo " -u, --update use to update existing components (true|false)" echo " -je, --jwtenabled specifies the enabling the JWT validation (true|false)" echo " -jh, --jwtheader defines the http header that will be used to send the JWT" diff --git a/install/OneClickInstall/install-RedHat/install-app.sh b/install/OneClickInstall/install-RedHat/install-app.sh index 92efac8195..829eb0b6dd 100644 --- a/install/OneClickInstall/install-RedHat/install-app.sh +++ b/install/OneClickInstall/install-RedHat/install-app.sh @@ -21,13 +21,11 @@ done if [ "$UPDATE" = "true" ] && [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then ds_pkg_installed_name=$(rpm -qa --qf '%{NAME}\n' | grep ${package_sysname}-documentserver); - if [ "$INSTALLATION_TYPE" = "COMMUNITY" ]; then - ds_pkg_name="${package_sysname}-documentserver"; - fi - - if [ "$INSTALLATION_TYPE" = "ENTERPRISE" ]; then - ds_pkg_name="${package_sysname}-documentserver-ee"; - fi + ds_pkg_name="${package_sysname}-documentserver" + case "${INSTALLATION_TYPE}" in + "DEVELOPMENT") ds_pkg_name+="-de" ;; + "ENTERPRISE") ds_pkg_name+="-ee" ;; + esac if [ -n $ds_pkg_name ]; then if ! rpm -qi ${ds_pkg_name} &> /dev/null; then diff --git a/install/common/product-configuration b/install/common/product-configuration index e670fbc91f..5838df5b07 100644 --- a/install/common/product-configuration +++ b/install/common/product-configuration @@ -613,9 +613,11 @@ setup_docs() { echo "OK" } -setup_enterprise() { - if $PACKAGE_MANAGER ${PACKAGE_SYSNAME}-documentserver-ee >/dev/null 2>&1; then - LICENCE_PATH="/var/www/$PACKAGE_SYSNAME/Data/license.lic" +setup_installation_type() { + if ${PACKAGE_MANAGER} ${PACKAGE_SYSNAME}-documentserver-de >/dev/null 2>&1; then + LICENCE_PATH="/var/www/${PACKAGE_SYSNAME}/Data/license.lic" + elif ${PACKAGE_MANAGER} ${PACKAGE_SYSNAME}-documentserver-ee >/dev/null 2>&1; then + LICENCE_PATH="/var/www/${PACKAGE_SYSNAME}/Data/license_de.lic" fi save_undefined_param "${USER_CONF}" "license.file.path" "${LICENCE_PATH}" "rewrite" @@ -869,9 +871,10 @@ if [[ ! -z $DOCUMENT_SERVER_URL_EXTERNAL ]]; then setup_docs "EXTERNAL_DOCS_SERVER" elif $PACKAGE_MANAGER ${PACKAGE_SYSNAME}-documentserver >/dev/null 2>&1 || $PACKAGE_MANAGER ${PACKAGE_SYSNAME}-documentserver-de >/dev/null 2>&1 || $PACKAGE_MANAGER ${PACKAGE_SYSNAME}-documentserver-ee >/dev/null 2>&1; then setup_docs "LOCAL_DOCS_SERVER" - setup_enterprise fi +setup_installation_type + if $PACKAGE_MANAGER openresty >/dev/null 2>&1; then setup_openresty fi diff --git a/install/docker/docker-entrypoint.py b/install/docker/docker-entrypoint.py index 20537e0ddd..681a0c2f57 100644 --- a/install/docker/docker-entrypoint.py +++ b/install/docker/docker-entrypoint.py @@ -177,6 +177,8 @@ updateJsonData(jsonData,"$.debug-info.enabled", DEBUG_INFO) updateJsonData(jsonData,"$.web.samesite", SAMESITE) if INSTALLATION_TYPE == "ENTERPRISE": updateJsonData(jsonData, "$.license.file.path", "/app/onlyoffice/data/license.lic") +elif INSTALLATION_TYPE == "DEVELOPMENT": + updateJsonData(jsonData, "$.license.file.path", "/app/onlyoffice/data/license.lic") ip_address = netifaces.ifaddresses('eth0').get(netifaces.AF_INET)[0].get('addr') netmask = netifaces.ifaddresses('eth0').get(netifaces.AF_INET)[0].get('netmask')