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 )
|
-? | -h | --help )
|
||||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||||
echo " Parameters:"
|
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 " -u, --update use to update existing components (true|false)"
|
||||||
echo " -je, --jwtenabled specifies the enabling the JWT validation (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"
|
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
|
if [ "$UPDATE" = "true" ] && [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then
|
||||||
ds_pkg_installed_name=$(dpkg -l | grep ${package_sysname}-documentserver | tail -n1 | awk '{print $2}');
|
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"
|
||||||
ds_pkg_name="${package_sysname}-documentserver";
|
case "${INSTALLATION_TYPE}" in
|
||||||
elif [ "$INSTALLATION_TYPE" = "ENTERPRISE" ]; then
|
"DEVELOPMENT") ds_pkg_name+="-de" ;;
|
||||||
ds_pkg_name="${package_sysname}-documentserver-ee";
|
"ENTERPRISE") ds_pkg_name+="-ee" ;;
|
||||||
fi
|
esac
|
||||||
|
|
||||||
if [ -n $ds_pkg_name ]; then
|
if [ -n $ds_pkg_name ]; then
|
||||||
if ! dpkg -l ${ds_pkg_name} &> /dev/null; then
|
if ! dpkg -l ${ds_pkg_name} &> /dev/null; then
|
||||||
|
@ -515,7 +515,7 @@ while [ "$1" != "" ]; do
|
|||||||
echo " -hub, --hub dockerhub name"
|
echo " -hub, --hub dockerhub name"
|
||||||
echo " -un, --username dockerhub username"
|
echo " -un, --username dockerhub username"
|
||||||
echo " -p, --password dockerhub password"
|
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 " -skiphc, --skiphardwarecheck skip hardware check (true|false)"
|
||||||
echo " -u, --update use to update existing components (true|false)"
|
echo " -u, --update use to update existing components (true|false)"
|
||||||
echo " -ids, --installdocspace install or update $PRODUCT (true|false)"
|
echo " -ids, --installdocspace install or update $PRODUCT (true|false)"
|
||||||
@ -1127,10 +1127,12 @@ set_docspace_params() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set_installation_type_data () {
|
set_installation_type_data () {
|
||||||
if [ "$INSTALLATION_TYPE" == "COMMUNITY" ]; then
|
if [ -z "${DOCUMENT_SERVER_IMAGE_NAME}" ]; then
|
||||||
DOCUMENT_SERVER_IMAGE_NAME=${DOCUMENT_SERVER_IMAGE_NAME:-"${PACKAGE_SYSNAME}/${STATUS}documentserver"}
|
DOCUMENT_SERVER_IMAGE_NAME="${PACKAGE_SYSNAME}/${STATUS}documentserver"
|
||||||
elif [ "$INSTALLATION_TYPE" == "ENTERPRISE" ]; then
|
case "${INSTALLATION_TYPE}" in
|
||||||
DOCUMENT_SERVER_IMAGE_NAME=${DOCUMENT_SERVER_IMAGE_NAME:-"${PACKAGE_SYSNAME}/${STATUS}documentserver-ee"}
|
"DEVELOPMENT") DOCUMENT_SERVER_IMAGE_NAME+="-de" ;;
|
||||||
|
"ENTERPRISE") DOCUMENT_SERVER_IMAGE_NAME+="-ee" ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ while [ "$1" != "" ]; do
|
|||||||
-? | -h | --help )
|
-? | -h | --help )
|
||||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||||
echo " Parameters:"
|
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 " -u, --update use to update existing components (true|false)"
|
||||||
echo " -je, --jwtenabled specifies the enabling the JWT validation (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"
|
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
|
if [ "$UPDATE" = "true" ] && [ "$DOCUMENT_SERVER_INSTALLED" = "true" ]; then
|
||||||
ds_pkg_installed_name=$(rpm -qa --qf '%{NAME}\n' | grep ${package_sysname}-documentserver);
|
ds_pkg_installed_name=$(rpm -qa --qf '%{NAME}\n' | grep ${package_sysname}-documentserver);
|
||||||
|
|
||||||
if [ "$INSTALLATION_TYPE" = "COMMUNITY" ]; then
|
ds_pkg_name="${package_sysname}-documentserver"
|
||||||
ds_pkg_name="${package_sysname}-documentserver";
|
case "${INSTALLATION_TYPE}" in
|
||||||
fi
|
"DEVELOPMENT") ds_pkg_name+="-de" ;;
|
||||||
|
"ENTERPRISE") ds_pkg_name+="-ee" ;;
|
||||||
if [ "$INSTALLATION_TYPE" = "ENTERPRISE" ]; then
|
esac
|
||||||
ds_pkg_name="${package_sysname}-documentserver-ee";
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n $ds_pkg_name ]; then
|
if [ -n $ds_pkg_name ]; then
|
||||||
if ! rpm -qi ${ds_pkg_name} &> /dev/null; then
|
if ! rpm -qi ${ds_pkg_name} &> /dev/null; then
|
||||||
|
@ -613,9 +613,11 @@ setup_docs() {
|
|||||||
echo "OK"
|
echo "OK"
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_enterprise() {
|
setup_installation_type() {
|
||||||
if $PACKAGE_MANAGER ${PACKAGE_SYSNAME}-documentserver-ee >/dev/null 2>&1; then
|
if ${PACKAGE_MANAGER} ${PACKAGE_SYSNAME}-documentserver-de >/dev/null 2>&1; then
|
||||||
LICENCE_PATH="/var/www/$PACKAGE_SYSNAME/Data/license.lic"
|
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
|
fi
|
||||||
|
|
||||||
save_undefined_param "${USER_CONF}" "license.file.path" "${LICENCE_PATH}" "rewrite"
|
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"
|
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
|
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_docs "LOCAL_DOCS_SERVER"
|
||||||
setup_enterprise
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
setup_installation_type
|
||||||
|
|
||||||
if $PACKAGE_MANAGER openresty >/dev/null 2>&1; then
|
if $PACKAGE_MANAGER openresty >/dev/null 2>&1; then
|
||||||
setup_openresty
|
setup_openresty
|
||||||
fi
|
fi
|
||||||
|
@ -177,6 +177,8 @@ updateJsonData(jsonData,"$.debug-info.enabled", DEBUG_INFO)
|
|||||||
updateJsonData(jsonData,"$.web.samesite", SAMESITE)
|
updateJsonData(jsonData,"$.web.samesite", SAMESITE)
|
||||||
if INSTALLATION_TYPE == "ENTERPRISE":
|
if INSTALLATION_TYPE == "ENTERPRISE":
|
||||||
updateJsonData(jsonData, "$.license.file.path", "/app/onlyoffice/data/license.lic")
|
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')
|
ip_address = netifaces.ifaddresses('eth0').get(netifaces.AF_INET)[0].get('addr')
|
||||||
netmask = netifaces.ifaddresses('eth0').get(netifaces.AF_INET)[0].get('netmask')
|
netmask = netifaces.ifaddresses('eth0').get(netifaces.AF_INET)[0].get('netmask')
|
||||||
|
Loading…
Reference in New Issue
Block a user