Merge branch 'release/v2.5.0' into develop

This commit is contained in:
Alexey Safronov 2024-04-10 20:03:24 +04:00
commit e14d215876
4 changed files with 16 additions and 16 deletions

View File

@ -46,7 +46,7 @@ map $request_uri $cache_control {
default "no-cache, no-store, no-transform";
~*\/(filehandler\.ashx\?action=(thumb|preview))|\/(storage\/room_logos\/root\/.*\?hash.*|storage\/userPhotos\/root\/.*\?hash.*|storage\/whitelabel\/root\/.*\?hash.*|storage\/static_partnerdata\/root\/.*\?hash.*) "must-revalidate, no-transform, immutable, max-age=31536000";
~*\/(api\/2\.0.*|storage|login\.ashx|filehandler\.ashx|ChunkedUploader.ashx|ThirdPartyAppHandler|apisystem|sh|remoteEntry\.js|debuginfo\.md|static\/scripts\/api\.js|static\/scripts\/api\.poly\.js) "no-cache, no-store, no-transform";
~*\/(images\/logo)|\.(js|woff|woff2|css)|(locales.*\.json) "must-revalidate, no-transform, immutable, max-age=31536000";
~*\/(static\/images\/.*)|\.(js|woff|woff2|css)|(locales.*\.json) "must-revalidate, no-transform, immutable, max-age=31536000";
}
map $request_uri $content_security_policy {

View File

@ -85,6 +85,8 @@ elif [ "$UPDATE" = "true" ] && [ "$PRODUCT_INSTALLED" = "true" ]; then
fi
fi
hold_package_version dotnet-host opensearch redis-server rabbitmq-server
if [ "$MAKESWAP" == "true" ]; then
make_swap
fi

View File

@ -24,6 +24,18 @@ command_exists () {
type "$1" &> /dev/null;
}
# Function to prevent package auto-update
hold_package_version() {
for package in "$@"; do
if command -v apt-mark >/dev/null 2>&1 &&
dpkg -s "$package" >/dev/null 2>&1 &&
! apt-mark showhold | grep -q "$package" >/dev/null 2>&1
then
apt-mark hold "$package"
fi
done
}
check_hardware () {
DISK_REQUIREMENTS=40960;
MEMORY_REQUIREMENTS=8000;

View File

@ -236,7 +236,7 @@ set_core_machinekey () {
save_undefined_param "${USER_CONF}" "core.machinekey" "${CORE_MACHINEKEY}"
save_undefined_param "${USER_CONF}" "core['base-domain']" "${APP_HOST}"
save_undefined_param "${APP_DIR}/apisystem.${ENVIRONMENT}.json" "core.machinekey" "${CORE_MACHINEKEY}"
save_undefined_param "${APP_DIR}/apisystem.${ENVIRONMENT}.json" "core['base-domain']" "${CORE_MACHINEKEY}"
save_undefined_param "${APP_DIR}/apisystem.${ENVIRONMENT}.json" "core['base-domain']" "${APP_HOST}"
sed "s^\(machine_key\)\s*=.*^\1 = ${CORE_MACHINEKEY}^g" -i $APP_DIR/radicale.config
}
@ -780,16 +780,6 @@ check_connection_external_services() {
return $HOST_RESPONCE
}
# Function to prevent package auto-update
hold_package_version(){
if command -v apt >/dev/null 2>&1 &&
dpkg -s $1 >/dev/null 2>&1 &&
! apt-mark showhold | grep -q $1 >/dev/null 2>&1
then
apt-mark hold $1 >/dev/null 2>&1
fi
}
if command -v yum >/dev/null 2>&1; then
DIST="RedHat"
PACKAGE_MANAGER="rpm -q"
@ -802,7 +792,6 @@ elif command -v apt >/dev/null 2>&1; then
MYSQL_PACKAGE="mysql"
REDIS_PACKAGE="redis-server"
SYSTEMD_DIR="$(dirname $(dpkg-query -L ${PRODUCT}-api | grep systemd/system/))"
hold_package_version dotnet-host
fi
install_json
@ -831,7 +820,6 @@ if [[ ! -z $EXTERNAL_ELK_FLAG ]]; then
setup_elasticsearch "EXTERNAL_ELASTIC_SERVER"
elif $PACKAGE_MANAGER opensearch >/dev/null 2>&1; then
setup_elasticsearch "LOCAL_ELASTIC_SERVER"
hold_package_version opensearch
fi
if [[ ! -z $EXTERNAL_REDIS_FLAG ]]; then
@ -839,7 +827,6 @@ if [[ ! -z $EXTERNAL_REDIS_FLAG ]]; then
setup_redis "EXTERNAL_REDIS_SERVER"
elif $PACKAGE_MANAGER $REDIS_PACKAGE >/dev/null 2>&1; then
setup_redis "LOCAL_REDIS_SERVER"
hold_package_version $REDIS_PACKAGE
fi
if [[ ! -z $EXTERNAL_RABBITMQ_FLAG ]]; then
@ -847,7 +834,6 @@ if [[ ! -z $EXTERNAL_RABBITMQ_FLAG ]]; then
setup_rabbitmq "EXTERNAL_RABBITMQ_SERVER"
elif $PACKAGE_MANAGER rabbitmq-server >/dev/null 2>&1; then
setup_rabbitmq "LOCAL_RABBITMQ_SERVER"
hold_package_version rabbitmq-server
fi
restart_services