Add the ability to configure installation type development
This commit is contained in:
parent
dffd6d67b0
commit
2aa0cdd534
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user