Skip to content

Commit

Permalink
Merge pull request #1581 from ONLYOFFICE/release/v1.1.0
Browse files Browse the repository at this point in the history
Release/v1.1.0
  • Loading branch information
pavelbannov authored Jul 24, 2023
2 parents ad29f7d + d0479ea commit 61d088a
Show file tree
Hide file tree
Showing 10 changed files with 119 additions and 174 deletions.
4 changes: 3 additions & 1 deletion build/install/OneClickInstall/install-Debian/install-preq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ echo "deb [signed-by=/usr/share/keyrings/elastic-${ELASTIC_DIST}.x.gpg] https://
chmod 644 /usr/share/keyrings/elastic-${ELASTIC_DIST}.x.gpg

# add nodejs repo
curl -sL https://deb.nodesource.com/setup_16.x | bash -
[[ "$DISTRIB_CODENAME" =~ ^(bionic|stretch)$ ]] && NODE_VERSION="16" || NODE_VERSION="18"
curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -

#add dotnet repo
if [ "$DIST" = "debian" ] && [ "$DISTRIB_CODENAME" = "stretch" ]; then
Expand Down Expand Up @@ -77,6 +78,7 @@ if ! dpkg -l | grep -q "mysql-server"; then

#Temporary fix for missing mysql repository for debian bookworm
[ "$DISTRIB_CODENAME" = "bookworm" ] && sed -i "s/$DIST/ubuntu/g; s/$DISTRIB_CODENAME/jammy/g" /etc/apt/sources.list.d/mysql.list
[ "$DISTRIB_CODENAME" = "buster" ] && sed -i "s/$DIST/ubuntu/g; s/$DISTRIB_CODENAME/bionic/g" /etc/apt/sources.list.d/mysql.list

echo mysql-community-server mysql-community-server/root-pass password ${MYSQL_SERVER_PASS} | debconf-set-selections
echo mysql-community-server mysql-community-server/re-root-pass password ${MYSQL_SERVER_PASS} | debconf-set-selections
Expand Down
7 changes: 3 additions & 4 deletions build/install/OneClickInstall/install-Docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,8 @@ domain_check () {

if [[ -n "$DOMAINS" ]]; then
while IFS= read -r DOMAIN; do
IP_ADDRESS=$(dig +short "$DOMAIN")
if [[ -n "$IP_ADDRESS" || "$IP_ADDRESS" =~ ^127\. ]]; then
IP_ADDRESS=$(ping -c 1 -W 1 $DOMAIN | grep -oP '(\d+\.\d+\.\d+\.\d+)' | head -n 1)
if [[ -n "$IP_ADDRESS" && "$IP_ADDRESS" =~ ^(10\.|127\.|172\.(1[6-9]|2[0-9]|3[0-1])\.|192\.168\.) ]]; then
LOCAL_RESOLVED_DOMAINS+="$DOMAIN"
elif [[ -n "$IP_ADDRESS" ]]; then
APP_URL_PORTAL=${APP_URL_PORTAL-:"http://${DOMAIN}:${EXTERNAL_PORT}"}
Expand All @@ -732,7 +732,6 @@ domain_check () {

if [[ -n "$LOCAL_RESOLVED_DOMAINS" ]] || [[ $(ip route get 8.8.8.8 | awk '{print $7}') != $(curl -s ifconfig.me) ]]; then
DOCKER_DAEMON_FILE="/etc/docker/daemon.json"
APP_URL_PORTAL=${APP_URL_PORTAL:-${LOCAL_RESOLVED_DOMAINS[0]}}
if ! grep -q '"dns"' "$DOCKER_DAEMON_FILE" 2>/dev/null; then
echo "A problem was detected for ${LOCAL_RESOLVED_DOMAINS[@]} domains when using a loopback IP address or when using NAT."
echo "Select 'Y' to continue installing with configuring the use of external IP in Docker via Google Public DNS."
Expand Down Expand Up @@ -1032,7 +1031,7 @@ install_product () {
reconfigure MYSQL_HOST ${MYSQL_HOST}
reconfigure APP_CORE_MACHINEKEY ${APP_CORE_MACHINEKEY}
reconfigure APP_CORE_BASE_DOMAIN ${APP_CORE_BASE_DOMAIN}
reconfigure APP_URL_PORTAL "${APP_URL_PORTAL:-"http://${PACKAGE_SYSNAME}-proxy:${EXTERNAL_PORT}"}"
reconfigure APP_URL_PORTAL "${APP_URL_PORTAL:-"http://${PACKAGE_SYSNAME}-proxy:8092"}"
reconfigure DOCKER_TAG ${DOCKER_TAG}

[[ -n $EXTERNAL_PORT ]] && sed -i "s/8092:8092/${EXTERNAL_PORT}:8092/g" $BASE_DIR/${PRODUCT}.yml
Expand Down
3 changes: 2 additions & 1 deletion build/install/OneClickInstall/install-RedHat/install-preq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ curl -s https://packagecloud.io/install/repositories/rabbitmq/rabbitmq-server/sc
curl -s https://packagecloud.io/install/repositories/rabbitmq/erlang/script.rpm.sh | os=centos dist=$REV bash

#add nodejs repo
curl -sL https://rpm.nodesource.com/setup_16.x | sed 's/centos|/'$DIST'|/g' | sudo bash - || true
[ "$REV" = "7" ] && NODE_VERSION="16" || NODE_VERSION="18"
curl -sL https://rpm.nodesource.com/setup_${NODE_VERSION}.x | sed 's/centos|/'$DIST'|/g' | sudo bash - || true
rpm --import http://rpm.nodesource.com/pub/el/NODESOURCE-GPG-SIGNING-KEY-EL

#add dotnet repo
Expand Down
1 change: 0 additions & 1 deletion build/install/common/product-configuration
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,6 @@ setup_docs() {
}

setup_enterprise() {
[ ! -d /var/www/$PACKAGE_SYSNAME/Data/ ] && mkdir -p /var/www/$PACKAGE_SYSNAME/Data/
$JSON $APP_DIR/appsettings.json -e "this.license.file={'path': \"/var/www/$PACKAGE_SYSNAME/Data/license.lic\"}" >/dev/null 2>&1
}

Expand Down
4 changes: 2 additions & 2 deletions build/install/common/systemd/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ done
PRODUCT="docspace"
BASE_DIR="/var/www/${PRODUCT}"
PATH_TO_CONF="/etc/onlyoffice/${PRODUCT}"
STORAGE_ROOT="${PATH_TO_CONF}/data"
STORAGE_ROOT="/var/www/onlyoffice/Data"
LOG_DIR="/var/log/onlyoffice/${PRODUCT}"
DOTNET_RUN="/usr/bin/dotnet"
NODE_RUN="/usr/bin/node"
Expand Down Expand Up @@ -166,7 +166,7 @@ reassign_values (){
SERVICE_TYPE="notify"
RESTART="always"
EXEC_START="${DOTNET_RUN} ${WORK_DIR}${EXEC_FILE} --urls=${APP_URLS}:${SERVICE_PORT} --pathToConf=${PATH_TO_CONF} \
--'\$STORAGE_ROOT'=${STORAGE_ROOT} --log:dir=${LOG_DIR} --log:name=${SERVICE_NAME}${CORE}${CORE_EVENT_BUS}${ENVIRONMENT}"
--\$STORAGE_ROOT=${STORAGE_ROOT} --log:dir=${LOG_DIR} --log:name=${SERVICE_NAME}${CORE}${CORE_EVENT_BUS}${ENVIRONMENT}"
unset CORE_EVENT_BUS
fi
}
Expand Down
120 changes: 54 additions & 66 deletions build/install/win/DocSpace.Enterprise.aip

Large diffs are not rendered by default.

116 changes: 50 additions & 66 deletions build/install/win/DocSpace.aip

Large diffs are not rendered by default.

30 changes: 0 additions & 30 deletions build/install/win/build-download-prereq.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -106,54 +106,24 @@ $nuget_packages = @(
$path_enterprise_prereq = "${pwd}\build\install\win\redist\"

$enterprise_prerequisites = @(
@{
download_allways = $false;
name = ".net_framework_4.8.exe";
link = "https://download.visualstudio.microsoft.com/download/pr/014120d7-d689-4305-befd-3cb711108212/0fd66638cde16859462a6243a4629a50/ndp48-x86-x64-allos-enu.exe"
}

@{
download_allways = $false;
name = "aspnetcore-runtime-7.0.4-win-x64.exe";
link = "https://download.visualstudio.microsoft.com/download/pr/1c260404-69d2-4c07-979c-644846ba1f46/7d27639ac67f1e502b83a738406da0ee/aspnetcore-runtime-7.0.4-win-x64.exe";
}

@{
download_allways = $false;
name = "aspnetcore-runtime-7.0.4-win-x86.exe";
link = "https://download.visualstudio.microsoft.com/download/pr/771de8e0-6c27-435f-8471-32e360408e15/4f84ca38b7988cc602d1ca62c0469ad2/aspnetcore-runtime-7.0.4-win-x86.exe";
}

@{
download_allways = $false;
name = "dotnet-runtime-7.0.4-win-x64.exe";
link = "https://download.visualstudio.microsoft.com/download/pr/7e842a78-9877-4b82-8450-f3311b406a6f/83352282a0bdf1e5f9dfc5fcc88dc83f/dotnet-runtime-7.0.4-win-x64.exe";
}

@{
download_allways = $false;
name = "dotnet-runtime-7.0.4-win-x86.exe";
link = "https://download.visualstudio.microsoft.com/download/pr/a44ad7c4-c079-4299-a5a5-669d53707f76/9a94eeb3cdf9529d40e8020a3b8f6c61/dotnet-runtime-7.0.4-win-x86.exe";
}

@{
download_allways = $false;
name = "vcredist_2013u5_x86.exe";
link = "http://download.microsoft.com/download/C/C/2/CC2DF5F8-4454-44B4-802D-5EA68D086676/vcredist_x86.exe";
}

@{
download_allways = $false;
name = "vcredist_2013u5_x64.exe";
link = "http://download.microsoft.com/download/C/C/2/CC2DF5F8-4454-44B4-802D-5EA68D086676/vcredist_x64.exe";
}

@{
download_allways = $false;
name = "VC_redist.x86.exe";
link = "https://download.visualstudio.microsoft.com/download/pr/d60aa805-26e9-47df-b4e3-cd6fcc392333/A06AAC66734A618AB33C1522920654DDFC44FC13CAFAA0F0AB85B199C3D51DC0/VC_redist.x86.exe";
}

@{
download_allways = $false;
name = "VC_redist.x64.exe";
Expand Down
6 changes: 3 additions & 3 deletions common/ASC.Core.Common/Billing/TariffService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ public Tariff GetTariff(int tenantId, bool withRequestToPaymentSystem = true, bo
UpdateCache(tariff.Id);
}
}
else if (_tenantExtraConfig.Enterprise && tariff.Id == 0)
else if (_tenantExtraConfig.Enterprise && tariff.Id == 0 && tariff.LicenseDate == DateTime.MaxValue)
{
var defaultQuota = _quotaService.GetTenantQuota(Tenant.DefaultTenant);

Expand All @@ -301,8 +301,7 @@ public Tariff GetTariff(int tenantId, bool withRequestToPaymentSystem = true, bo
tariff = new Tariff
{
Quotas = new List<Quota> { new Quota(quota.Tenant, 1) },
DueDate = DateTime.UtcNow.AddDays(DefaultTrialPeriod),
Id = 1000
DueDate = DateTime.UtcNow.AddDays(DefaultTrialPeriod)
};

SetTariff(-1, tariff, new List<TenantQuota> { quota });
Expand Down Expand Up @@ -931,6 +930,7 @@ private Tariff CalculateTariff(int tenantId, Tariff tariff)

var unlimTariff = CreateDefault();
unlimTariff.LicenseDate = tariff.DueDate;
unlimTariff.DueDate = tariff.DueDate;
unlimTariff.Quotas = new List<Quota>()
{
new Quota(defaultQuota.Tenant, 1)
Expand Down
2 changes: 2 additions & 0 deletions web/ASC.Web.Core/Notify/StudioNotifyService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -664,11 +664,13 @@ public void SendAdminWelcome(UserInfo newUserInfo)

if (_tenantExtra.Enterprise)
{
return;
var defaultRebranding = MailWhiteLabelSettings.IsDefault(_settingsManager);
notifyAction = defaultRebranding ? Actions.EnterpriseAdminWelcomeV1 : Actions.EnterpriseWhitelabelAdminWelcomeV1;
}
else if (_tenantExtra.Opensource)
{
return;
notifyAction = Actions.OpensourceAdminWelcomeV1;
tagValues.Add(new TagValue(CommonTags.Footer, "opensource"));
}
Expand Down

0 comments on commit 61d088a

Please sign in to comment.