upgrade to 1.5.0
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="dotless" version="1.3.1" />
|
||||
<package id="log4net" version="1.2.10" />
|
||||
<package id="log4net" version="2.0.3" />
|
||||
<package id="Microsoft.AspNet.Mvc" version="4.0.40804" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Razor" version="2.0.20710" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
|
||||
|
179
packages/dotless.1.3.1.0/license.txt
vendored
@ -1,179 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
Copyright (c) 2009-2010 dotless project, http://www.dotlesscss.com
|
BIN
references/ASC.Core.Common.dll
Normal file
BIN
references/ASC.Resource.Data.dll
Normal file
BIN
references/FileConverterUtils2.dll
Normal file
@ -19,12 +19,8 @@
|
||||
|
||||
namespace OneClickInstallation.Classes
|
||||
{
|
||||
public class EmailSender
|
||||
public class ImageTag
|
||||
{
|
||||
public string Host { get; set; }
|
||||
public int Port { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Password { get; set; }
|
||||
public bool EnableSsl { get; set; }
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
@ -32,9 +32,13 @@ namespace OneClickInstallation.Classes
|
||||
public class InstallationManager : IDisposable
|
||||
{
|
||||
private string UserId { get; set; }
|
||||
private string LicenseKey { get; set; }
|
||||
private bool Enterprise { get; set; }
|
||||
|
||||
private ConnectionInfo ConnectionInfo { get; set; }
|
||||
private InstallationProgressModel InstallationProgress { get; set; }
|
||||
private InstallationComponentsModel InstallationComponents { get; set; }
|
||||
private InstallationComponentsModel InstalledComponents { get; set; }
|
||||
|
||||
private SshClient _sshClient;
|
||||
private SftpClient _sftpClient;
|
||||
@ -85,9 +89,12 @@ namespace OneClickInstallation.Classes
|
||||
public InstallationManager(string userId, ConnectionSettingsModel connectionSettings, InstallationComponentsModel installationComponents = null)
|
||||
{
|
||||
UserId = userId;
|
||||
LicenseKey = connectionSettings.LicenseKey;
|
||||
Enterprise = connectionSettings.Enterprise;
|
||||
ConnectionInfo = GetConnectionInfo(connectionSettings);
|
||||
InstallationProgress = CacheHelper.GetInstallationProgress(userId) ?? new InstallationProgressModel();
|
||||
InstallationComponents = installationComponents;
|
||||
InstalledComponents = CacheHelper.GetInstalledComponents(userId) ?? new InstallationComponentsModel();
|
||||
}
|
||||
|
||||
public void StartInstallation()
|
||||
@ -98,22 +105,24 @@ namespace OneClickInstallation.Classes
|
||||
|
||||
UploadFiles();
|
||||
|
||||
var osInfo = GetOsInfo(FileMap.GetOsInfoScript);
|
||||
var osInfo = GetOsInfo(FileMap.GetOsInfoScript, InstallationProgressStep.GetOsInfo);
|
||||
|
||||
CheckPorts();
|
||||
|
||||
InstallDocker(osInfo);
|
||||
|
||||
if (InstallationComponents.DocumentServer)
|
||||
InstallDocumentServer();
|
||||
CreateNetwork();
|
||||
|
||||
if (InstallationComponents.MailServer)
|
||||
InstallMailServer();
|
||||
InstallDocumentServer();
|
||||
|
||||
if (InstallationComponents.CommunityServer)
|
||||
InstallCommunityServer();
|
||||
InstallMailServer();
|
||||
|
||||
CheckPreviousVersion(FileMap.CheckPreviousVersionScript);
|
||||
if (Enterprise)
|
||||
InstallControlPanel();
|
||||
|
||||
InstallCommunityServer();
|
||||
|
||||
CheckPreviousVersion(FileMap.CheckPreviousVersionScript, true);
|
||||
|
||||
WarmUp();
|
||||
}
|
||||
@ -131,17 +140,20 @@ namespace OneClickInstallation.Classes
|
||||
}
|
||||
}
|
||||
|
||||
public InstallationComponentsModel Connect()
|
||||
public Tuple<OsInfo, InstallationComponentsModel> Connect()
|
||||
{
|
||||
var tmpCheckPreviousVersionScript = new FileMap("~/Executables/tools/check-previous-version.sh", "./");
|
||||
var tmpGetOsInfoScript = new FileMap("~/Executables/tools/get-os-info.sh", "./");
|
||||
|
||||
UploadFile(tmpCheckPreviousVersionScript);
|
||||
UploadFile(tmpCheckPreviousVersionScript, tmpGetOsInfoScript);
|
||||
|
||||
CheckPreviousVersion(tmpCheckPreviousVersionScript);
|
||||
CheckPreviousVersion(tmpCheckPreviousVersionScript, false);
|
||||
var osInfo = GetOsInfo(tmpGetOsInfoScript, null);
|
||||
|
||||
SftpClient.DeleteFile(tmpCheckPreviousVersionScript.RemotePath);
|
||||
SftpClient.DeleteFile(tmpGetOsInfoScript.RemotePath);
|
||||
|
||||
return CacheHelper.GetInstalledComponents(UserId);
|
||||
return new Tuple<OsInfo, InstallationComponentsModel>(osInfo, CacheHelper.GetInstalledComponents(UserId));
|
||||
}
|
||||
|
||||
private static ConnectionInfo GetConnectionInfo(ConnectionSettingsModel connectionSettings)
|
||||
@ -169,14 +181,36 @@ namespace OneClickInstallation.Classes
|
||||
|
||||
CreateDirectories();
|
||||
|
||||
UploadFile(FileMap.GetOsInfoScript,
|
||||
FileMap.CheckPortsScript,
|
||||
FileMap.CheckPreviousVersionScript,
|
||||
FileMap.MakeDirScript,
|
||||
FileMap.RunDockerScript,
|
||||
FileMap.RunCommunityServerScript,
|
||||
FileMap.RunDocumentServerScript,
|
||||
FileMap.RunMailServerScript);
|
||||
var files = new List<FileMap>
|
||||
{
|
||||
FileMap.RunDockerScript,
|
||||
|
||||
FileMap.CheckBindingsScript,
|
||||
FileMap.CheckPortsScript,
|
||||
FileMap.CheckPreviousVersionScript,
|
||||
FileMap.GetAvailableVersionScript,
|
||||
FileMap.GetOsInfoScript,
|
||||
FileMap.LoginDockerScript,
|
||||
FileMap.MakeDirScript,
|
||||
FileMap.MakeNetworkScript,
|
||||
FileMap.PullImageScript,
|
||||
FileMap.RemoveContainerScript,
|
||||
|
||||
FileMap.RunCommunityServerScript,
|
||||
FileMap.RunControlPanelScript,
|
||||
FileMap.RunDocumentServerScript,
|
||||
FileMap.RunMailServerScript
|
||||
};
|
||||
|
||||
if (Enterprise && !string.IsNullOrEmpty(LicenseKey))
|
||||
{
|
||||
files.Add(FileMap.MakeLicenseFileMap(LicenseKey, "DocumentServer"));
|
||||
files.Add(FileMap.MakeLicenseFileMap(LicenseKey, "MailServer"));
|
||||
files.Add(FileMap.MakeLicenseFileMap(LicenseKey, "CommunityServer"));
|
||||
files.Add(FileMap.MakeLicenseFileMap(LicenseKey, "ControlPanel"));
|
||||
}
|
||||
|
||||
UploadFile(files.ToArray());
|
||||
}
|
||||
|
||||
private void UploadFile(params FileMap[] files)
|
||||
@ -190,7 +224,7 @@ namespace OneClickInstallation.Classes
|
||||
|
||||
using (var fileStream = File.OpenRead(file.LocalPath))
|
||||
{
|
||||
SftpClient.UploadFile(fileStream, file.FileName, true);
|
||||
SftpClient.UploadFile(fileStream, file.IsScriptFile ? file.FileName : "license.lic", true);
|
||||
}
|
||||
}
|
||||
|
||||
@ -208,180 +242,196 @@ namespace OneClickInstallation.Classes
|
||||
SftpClient.DeleteFile(tmpScript.RemotePath);
|
||||
}
|
||||
|
||||
private OsInfo GetOsInfo(FileMap script)
|
||||
private OsInfo GetOsInfo(FileMap script, InstallationProgressStep? progressStep)
|
||||
{
|
||||
InstallationProgress.Step = InstallationProgressStep.GetOsInfo;
|
||||
CacheHelper.SetInstallationProgress(UserId, InstallationProgress);
|
||||
|
||||
using (var stream = SshClient.CreateShellStream("terminal", 150, 24, 800, 600, 1024))
|
||||
{
|
||||
stream.WriteLine(string.Format("sudo bash {0}", script.RemotePath));
|
||||
|
||||
var output = stream.Expect(Settings.InstallationStopPattern);
|
||||
|
||||
if (output.Contains(Settings.InstallationSuccessPattern))
|
||||
InstallationProgress.ProgressText += output;
|
||||
|
||||
if (output.Contains(Settings.InstallationErrorPattern))
|
||||
throw new Exception(output);
|
||||
}
|
||||
var output = RunScript(progressStep, script);
|
||||
|
||||
var osInfo = new OsInfo
|
||||
{
|
||||
Dist = GetTerminalParam(InstallationProgress.ProgressText, "DIST"),
|
||||
Ver = GetTerminalParam(InstallationProgress.ProgressText, "REV"),
|
||||
Type = GetTerminalParam(InstallationProgress.ProgressText, "MACH"),
|
||||
Kernel = GetTerminalParam(InstallationProgress.ProgressText, "KERNEL")
|
||||
};
|
||||
{
|
||||
Dist = GetTerminalParam(output, "DIST"),
|
||||
Ver = GetTerminalParam(output, "REV"),
|
||||
Type = GetTerminalParam(output, "MACH"),
|
||||
Kernel = GetTerminalParam(output, "KERNEL")
|
||||
};
|
||||
|
||||
CacheHelper.SetOsInfo(UserId, osInfo);
|
||||
|
||||
return osInfo;
|
||||
}
|
||||
|
||||
private void CheckPorts()
|
||||
{
|
||||
InstallationProgress.Step = InstallationProgressStep.CheckPorts;
|
||||
CacheHelper.SetInstallationProgress(UserId, InstallationProgress);
|
||||
var ports = new List<int>();
|
||||
|
||||
using (var stream = SshClient.CreateShellStream("terminal", 150, 24, 800, 600, 1024))
|
||||
{
|
||||
stream.WriteLine(string.Format("sudo bash {0} {1}",
|
||||
FileMap.CheckPortsScript.RemotePath,
|
||||
InstallationComponents.MailServer.ToString().ToLower()));
|
||||
if (!string.IsNullOrEmpty(InstallationComponents.CommunityServerVersion) && string.IsNullOrEmpty(InstalledComponents.CommunityServerVersion))
|
||||
ports.AddRange(new[] {80, 443, 5222});
|
||||
|
||||
var output = stream.Expect(Settings.InstallationStopPattern);
|
||||
if (!string.IsNullOrEmpty(InstallationComponents.MailServerVersion) && string.IsNullOrEmpty(InstalledComponents.MailServerVersion))
|
||||
ports.AddRange(new[] {25, 143, 587});
|
||||
|
||||
if (output.Contains(Settings.InstallationSuccessPattern))
|
||||
InstallationProgress.ProgressText += output;
|
||||
|
||||
if (output.Contains(Settings.InstallationErrorPattern))
|
||||
throw new Exception(output);
|
||||
}
|
||||
if (ports.Count > 0)
|
||||
RunScript(InstallationProgressStep.CheckPorts, FileMap.CheckPortsScript, string.Join(",", ports));
|
||||
}
|
||||
|
||||
private void MakeDirectories(FileMap script)
|
||||
{
|
||||
using (var stream = SshClient.CreateShellStream("terminal", 150, 24, 800, 600, 1024))
|
||||
{
|
||||
stream.WriteLine(string.Format("sudo bash {0} \"{1}\"", script.RemotePath, Settings.RemoteServerDir));
|
||||
|
||||
var output = stream.Expect(Settings.InstallationSuccessPattern);
|
||||
|
||||
InstallationProgress.ProgressText += output;
|
||||
}
|
||||
RunScript(null, script);
|
||||
}
|
||||
|
||||
private void CheckPreviousVersion(FileMap script)
|
||||
private void CheckPreviousVersion(FileMap script, bool useSudo)
|
||||
{
|
||||
using (var stream = SshClient.CreateShellStream("terminal", 150, 24, 800, 600, 1024))
|
||||
var output = RunScript(null,
|
||||
script,
|
||||
useSudo,
|
||||
"-cc " + Settings.DockerCommunityContainerName,
|
||||
"-dc " + Settings.DockerDocumentContainerName,
|
||||
"-mc " + Settings.DockerMailContainerName,
|
||||
"-cpc " + Settings.DockerControlPanelContainerName);
|
||||
|
||||
InstallationComponents = new InstallationComponentsModel
|
||||
{
|
||||
stream.WriteLine(string.Format("bash {0}", script.RemotePath));
|
||||
|
||||
var output = stream.Expect(Settings.InstallationStopPattern);
|
||||
|
||||
if (output.Contains(Settings.InstallationSuccessPattern))
|
||||
{
|
||||
InstallationComponents = new InstallationComponentsModel
|
||||
{
|
||||
MailServer = !string.IsNullOrEmpty(GetTerminalParam(output, "MAIL_SERVER_ID")),
|
||||
DocumentServer = !string.IsNullOrEmpty(GetTerminalParam(output, "DOCUMENT_SERVER_ID")),
|
||||
CommunityServer = !string.IsNullOrEmpty(GetTerminalParam(output, "COMMUNITY_SERVER_ID"))
|
||||
};
|
||||
|
||||
InstallationProgress.ProgressText += output;
|
||||
}
|
||||
|
||||
if (output.Contains(Settings.InstallationErrorPattern))
|
||||
throw new Exception(output);
|
||||
}
|
||||
MailServerVersion = GetTerminalParam(output, "MAIL_SERVER_VERSION"),
|
||||
DocumentServerVersion = GetTerminalParam(output, "DOCUMENT_SERVER_VERSION"),
|
||||
CommunityServerVersion = GetTerminalParam(output, "COMMUNITY_SERVER_VERSION"),
|
||||
ControlPanelVersion = GetTerminalParam(output, "CONTROL_PANEL_VERSION"),
|
||||
LicenseFileExist = bool.Parse(GetTerminalParam(output, "LICENSE_FILE_EXIST"))
|
||||
};
|
||||
|
||||
CacheHelper.SetInstalledComponents(UserId, InstallationComponents.IsEmpty ? null : InstallationComponents);
|
||||
}
|
||||
|
||||
private void InstallDocker(OsInfo osInfo, bool afterReboot = false)
|
||||
private void InstallDocker(OsInfo osInfo)
|
||||
{
|
||||
if(afterReboot)
|
||||
CheckPorts();
|
||||
RunScript(InstallationProgressStep.InstallDocker,
|
||||
FileMap.RunDockerScript,
|
||||
true,
|
||||
osInfo.Dist,
|
||||
osInfo.Ver,
|
||||
osInfo.Kernel,
|
||||
osInfo.Type);
|
||||
}
|
||||
|
||||
var needReboot = false;
|
||||
|
||||
InstallationProgress.Step = InstallationProgressStep.InstallDocker;
|
||||
CacheHelper.SetInstallationProgress(UserId, InstallationProgress);
|
||||
|
||||
var command = string.Format("sudo bash {0} \"{1}\" \"{2}\" \"{3}\" \"{4}\" {5}",
|
||||
FileMap.RunDockerScript.RemotePath,
|
||||
osInfo.Dist,
|
||||
osInfo.Ver,
|
||||
osInfo.Type,
|
||||
osInfo.Kernel,
|
||||
afterReboot ? true.ToString().ToLower() : string.Empty);
|
||||
|
||||
using (var stream = SshClient.CreateShellStream("terminal", 150, 24, 800, 600, 1024))
|
||||
{
|
||||
stream.WriteLine(command);
|
||||
|
||||
var output = stream.Expect(Settings.InstallationStopPattern);
|
||||
|
||||
if (output.Contains(Settings.InstallationRebootPattern))
|
||||
{
|
||||
InstallationProgress.ProgressText += output;
|
||||
InstallationProgress.Step = InstallationProgressStep.RebootServer;
|
||||
CacheHelper.SetInstallationProgress(UserId, InstallationProgress);
|
||||
|
||||
needReboot = true;
|
||||
|
||||
stream.WriteLine("sudo reboot");
|
||||
|
||||
System.Threading.Thread.Sleep(10000);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (output.Contains(Settings.InstallationSuccessPattern))
|
||||
InstallationProgress.ProgressText += output;
|
||||
|
||||
if (output.Contains(Settings.InstallationErrorPattern))
|
||||
throw new Exception(output);
|
||||
}
|
||||
}
|
||||
|
||||
if (needReboot)
|
||||
{
|
||||
InstallDocker(osInfo, true);
|
||||
}
|
||||
private void CreateNetwork()
|
||||
{
|
||||
RunScript(null, FileMap.MakeNetworkScript, true);
|
||||
}
|
||||
|
||||
private void InstallCommunityServer()
|
||||
{
|
||||
InstallServer(InstallationProgressStep.InstallCommunityServer, FileMap.RunCommunityServerScript);
|
||||
if (string.IsNullOrEmpty(InstallationComponents.CommunityServerVersion)) return;
|
||||
|
||||
var notExist = string.IsNullOrEmpty(InstalledComponents.CommunityServerVersion);
|
||||
|
||||
RunScript(InstallationProgressStep.InstallCommunityServer,
|
||||
FileMap.RunCommunityServerScript,
|
||||
"-i " + (Enterprise ? Settings.DockerEnterpriseCommunityImageName : Settings.DockerCommunityImageName),
|
||||
"-v " + (notExist ? InstallationComponents.CommunityServerVersion : InstalledComponents.CommunityServerVersion),
|
||||
"-c " + Settings.DockerCommunityContainerName,
|
||||
"-dc " + Settings.DockerDocumentContainerName,
|
||||
"-mc " + Settings.DockerMailContainerName,
|
||||
"-cc " + Settings.DockerControlPanelContainerName,
|
||||
"-p " + Settings.DockerHubPassword,
|
||||
"-un " + Settings.DockerHubUserName,
|
||||
notExist ? string.Empty : "-u");
|
||||
|
||||
if (!notExist) return;
|
||||
|
||||
InstalledComponents.CommunityServerVersion = InstallationComponents.CommunityServerVersion;
|
||||
CacheHelper.SetInstalledComponents(UserId, InstalledComponents);
|
||||
}
|
||||
|
||||
private void InstallDocumentServer()
|
||||
{
|
||||
InstallServer(InstallationProgressStep.InstallDocumentServer, FileMap.RunDocumentServerScript);
|
||||
if (string.IsNullOrEmpty(InstallationComponents.DocumentServerVersion)) return;
|
||||
|
||||
var notExist = string.IsNullOrEmpty(InstalledComponents.DocumentServerVersion);
|
||||
|
||||
RunScript(InstallationProgressStep.InstallDocumentServer,
|
||||
FileMap.RunDocumentServerScript,
|
||||
"-i " + (Enterprise ? Settings.DockerEnterpriseDocumentImageName : Settings.DockerDocumentImageName),
|
||||
"-v " + (notExist ? InstallationComponents.DocumentServerVersion : InstalledComponents.DocumentServerVersion),
|
||||
"-c " + Settings.DockerDocumentContainerName,
|
||||
"-p " + Settings.DockerHubPassword,
|
||||
"-un " + Settings.DockerHubUserName,
|
||||
notExist ? string.Empty : "-u");
|
||||
|
||||
if (!notExist) return;
|
||||
|
||||
InstalledComponents.DocumentServerVersion = InstallationComponents.DocumentServerVersion;
|
||||
CacheHelper.SetInstalledComponents(UserId, InstalledComponents);
|
||||
}
|
||||
|
||||
private void InstallMailServer()
|
||||
{
|
||||
InstallServer(InstallationProgressStep.InstallMailServer, FileMap.RunMailServerScript, InstallationComponents.MailDomain);
|
||||
if (string.IsNullOrEmpty(InstallationComponents.MailServerVersion)) return;
|
||||
|
||||
var notExist = string.IsNullOrEmpty(InstalledComponents.MailServerVersion);
|
||||
|
||||
RunScript(InstallationProgressStep.InstallMailServer,
|
||||
FileMap.RunMailServerScript,
|
||||
"-i " + (Enterprise ? Settings.DockerEnterpriseMailImageName : Settings.DockerMailImageName),
|
||||
"-v " + (notExist ? InstallationComponents.MailServerVersion : InstalledComponents.MailServerVersion),
|
||||
"-c " + Settings.DockerMailContainerName,
|
||||
string.IsNullOrEmpty(InstallationComponents.MailDomain) ? string.Empty : "-d " + InstallationComponents.MailDomain,
|
||||
"-p " + Settings.DockerHubPassword,
|
||||
"-un " + Settings.DockerHubUserName,
|
||||
notExist ? string.Empty : "-u");
|
||||
|
||||
if (!notExist) return;
|
||||
|
||||
InstalledComponents.MailServerVersion = InstallationComponents.MailServerVersion;
|
||||
CacheHelper.SetInstalledComponents(UserId, InstalledComponents);
|
||||
}
|
||||
|
||||
private void InstallServer(InstallationProgressStep progressStep, FileMap runServerScript, string serverScriptParam = "")
|
||||
private void InstallControlPanel()
|
||||
{
|
||||
InstallationProgress.Step = progressStep;
|
||||
CacheHelper.SetInstallationProgress(UserId, InstallationProgress);
|
||||
if (string.IsNullOrEmpty(InstallationComponents.ControlPanelVersion)) return;
|
||||
|
||||
using (var stream = SshClient.CreateShellStream("terminal", 150, 24, 800, 600, 1024))
|
||||
var notExist = string.IsNullOrEmpty(InstalledComponents.ControlPanelVersion);
|
||||
|
||||
RunScript(InstallationProgressStep.InstallControlPanel,
|
||||
FileMap.RunControlPanelScript,
|
||||
"-i " + (Enterprise ? Settings.DockerEnterpriseControlPanelImageName : Settings.DockerControlPanelImageName),
|
||||
"-v " + (notExist ? InstallationComponents.ControlPanelVersion : InstalledComponents.ControlPanelVersion),
|
||||
"-c " + Settings.DockerControlPanelContainerName,
|
||||
"-p " + Settings.DockerHubPassword,
|
||||
"-un " + Settings.DockerHubUserName,
|
||||
notExist ? string.Empty : "-u");
|
||||
|
||||
if (!notExist) return;
|
||||
|
||||
InstalledComponents.ControlPanelVersion = InstallationComponents.ControlPanelVersion;
|
||||
CacheHelper.SetInstalledComponents(UserId, InstalledComponents);
|
||||
}
|
||||
|
||||
private string RunScript(InstallationProgressStep? progressStep, FileMap runServerScript, params string[] scriptParams)
|
||||
{
|
||||
return RunScript(progressStep, runServerScript, true, scriptParams);
|
||||
}
|
||||
|
||||
private string RunScript(InstallationProgressStep? progressStep, FileMap runServerScript, bool useSudo, params string[] scriptParams)
|
||||
{
|
||||
if (progressStep.HasValue)
|
||||
{
|
||||
stream.WriteLine(!string.IsNullOrEmpty(serverScriptParam)
|
||||
? string.Format("sudo bash {0} \"{1}\"", runServerScript.RemotePath, serverScriptParam)
|
||||
: string.Format("sudo bash {0}", runServerScript.RemotePath));
|
||||
InstallationProgress.Step = progressStep.Value;
|
||||
CacheHelper.SetInstallationProgress(UserId, InstallationProgress);
|
||||
}
|
||||
|
||||
var commandFormat = (useSudo ? "sudo " : string.Empty) + "bash {0} {1}";
|
||||
|
||||
using (var stream = SshClient.CreateShellStream("terminal", 300, 100, 800, 600, 1024))
|
||||
{
|
||||
stream.WriteLine(string.Format(commandFormat, runServerScript.RemotePath, String.Join(" ", scriptParams)));
|
||||
|
||||
var output = stream.Expect(Settings.InstallationStopPattern);
|
||||
|
||||
if (output.Contains(Settings.InstallationErrorPattern))
|
||||
throw new Exception(output);
|
||||
|
||||
if (output.Contains(Settings.InstallationSuccessPattern))
|
||||
InstallationProgress.ProgressText += output;
|
||||
|
||||
if (output.Contains(Settings.InstallationErrorPattern))
|
||||
throw new Exception(output);
|
||||
return output;
|
||||
}
|
||||
}
|
||||
|
||||
@ -397,6 +447,8 @@ namespace OneClickInstallation.Classes
|
||||
{
|
||||
foreach (var file in files)
|
||||
{
|
||||
if (!file.IsScriptFile) continue;
|
||||
|
||||
RunCommand(sshClient, string.Format("chmod +x {0}", file.RemotePath));
|
||||
RunCommand(sshClient, string.Format("sed -i 's/\r$//' {0}", file.RemotePath));
|
||||
}
|
||||
@ -450,12 +502,21 @@ namespace OneClickInstallation.Classes
|
||||
|
||||
private class FileMap
|
||||
{
|
||||
public static readonly FileMap GetOsInfoScript = MakeSetupFileMap("get-os-info.sh", "tools");
|
||||
public static readonly FileMap RunDockerScript = MakeSetupFileMap("run-docker.sh", "assets");
|
||||
|
||||
public static readonly FileMap CheckBindingsScript = MakeSetupFileMap("check-bindings.sh", "tools");
|
||||
public static readonly FileMap CheckPortsScript = MakeSetupFileMap("check-ports.sh", "tools");
|
||||
public static readonly FileMap CheckPreviousVersionScript = MakeSetupFileMap("check-previous-version.sh", "tools");
|
||||
public static readonly FileMap GetAvailableVersionScript = MakeSetupFileMap("get-available-version.sh", "tools");
|
||||
public static readonly FileMap GetOsInfoScript = MakeSetupFileMap("get-os-info.sh", "tools");
|
||||
public static readonly FileMap LoginDockerScript = MakeSetupFileMap("login-docker.sh", "tools");
|
||||
public static readonly FileMap MakeDirScript = MakeSetupFileMap("make-dir.sh", "tools");
|
||||
public static readonly FileMap RunDockerScript = MakeSetupFileMap("run-docker.sh", "assets");
|
||||
public static readonly FileMap MakeNetworkScript = MakeSetupFileMap("make-network.sh", "tools");
|
||||
public static readonly FileMap PullImageScript = MakeSetupFileMap("pull-image.sh", "tools");
|
||||
public static readonly FileMap RemoveContainerScript = MakeSetupFileMap("remove-container.sh", "tools");
|
||||
|
||||
public static readonly FileMap RunCommunityServerScript = MakeSetupFileMap("run-community-server.sh");
|
||||
public static readonly FileMap RunControlPanelScript = MakeSetupFileMap("run-control-panel.sh");
|
||||
public static readonly FileMap RunDocumentServerScript = MakeSetupFileMap("run-document-server.sh");
|
||||
public static readonly FileMap RunMailServerScript = MakeSetupFileMap("run-mail-server.sh");
|
||||
|
||||
@ -463,17 +524,24 @@ namespace OneClickInstallation.Classes
|
||||
public string RemoteDir { get; private set; }
|
||||
public string FileName { get { return Path.GetFileName(LocalPath); } }
|
||||
public string RemotePath { get { return Path.Combine(RemoteDir, FileName).Replace("\\", "/"); } }
|
||||
public bool IsScriptFile { get; private set; }
|
||||
|
||||
public FileMap(string localPath, string remoteDir)
|
||||
public FileMap(string localPath, string remoteDir, bool isScriptFile = true)
|
||||
{
|
||||
LocalPath = HttpContext.Current.Server.MapPath(localPath);
|
||||
RemoteDir = remoteDir.TrimEnd('/').Replace("\\", "/");
|
||||
IsScriptFile = isScriptFile;
|
||||
}
|
||||
|
||||
private static FileMap MakeSetupFileMap(string script, string subFolder = "")
|
||||
{
|
||||
return new FileMap(Path.Combine("~/Executables", subFolder, script), Path.Combine(Settings.RemoteServerDir, "setup", subFolder));
|
||||
}
|
||||
|
||||
public static FileMap MakeLicenseFileMap(string fileName, string moduleName)
|
||||
{
|
||||
return new FileMap(FileHelper.GetTmpFileVirtualPath(fileName), Path.Combine(Settings.RemoteServerDir, moduleName, "data"), false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -39,14 +39,7 @@
|
||||
|
||||
&.disabled {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
&.small {
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
text-transform: none;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
&.green {
|
||||
@ -62,45 +55,8 @@
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
background: #b7b7b7;
|
||||
}
|
||||
}
|
||||
|
||||
&.gray {
|
||||
background: #f4f4f4;
|
||||
border-color: #e0e0e0;
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
color: #4c4c4c;
|
||||
padding: 0 19px;
|
||||
height: 46px;
|
||||
|
||||
&:hover {
|
||||
border-color: #c5c5c5;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: #eaeaea;
|
||||
border-color: #c5c5c5;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
background: #f4f4f4;
|
||||
border-color: #e0e0e0;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
&.dark {
|
||||
background: #888888;
|
||||
color: #ffffff;
|
||||
|
||||
&:hover {
|
||||
background: #909090;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: #808080;
|
||||
background: #66bb6a;
|
||||
color: #b5dbb7;
|
||||
}
|
||||
}
|
||||
|
||||
@ -115,18 +71,10 @@
|
||||
&:active {
|
||||
background: #444444;
|
||||
}
|
||||
}
|
||||
|
||||
&.blue {
|
||||
background: #7a8ab1;
|
||||
color: #ffffff;
|
||||
|
||||
&:hover {
|
||||
background: #8494bb;
|
||||
}
|
||||
|
||||
&:active {
|
||||
background: #667bae;
|
||||
&.disabled {
|
||||
background: #4c4c4c;
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
}
|
@ -121,6 +121,11 @@ input[type="password"]
|
||||
{
|
||||
background-position: -82px -135px;
|
||||
}
|
||||
|
||||
.label
|
||||
{
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
&.checked
|
||||
@ -160,6 +165,11 @@ input[type="password"]
|
||||
&.disabled
|
||||
{
|
||||
cursor: default;
|
||||
|
||||
.label
|
||||
{
|
||||
color: #999999;
|
||||
}
|
||||
}
|
||||
|
||||
&.checked
|
||||
@ -187,4 +197,99 @@ input[type="password"]
|
||||
padding: 0 8px 1px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.custom-select {
|
||||
border-color: #c1c1c1;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 10px 14px;
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
|
||||
&.error {
|
||||
border-color: #bf3703;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
|
||||
&.single
|
||||
{
|
||||
.borderRadius(3px);
|
||||
}
|
||||
|
||||
&.group-top
|
||||
{
|
||||
border-bottom-color: #f3f3f3;
|
||||
.borderTopRadius(3px);
|
||||
}
|
||||
|
||||
&.group-center
|
||||
{
|
||||
border-top-color: #f3f3f3;
|
||||
border-bottom-color: #f3f3f3;
|
||||
}
|
||||
|
||||
&.group-bottom
|
||||
{
|
||||
border-top-color: #f3f3f3;
|
||||
.borderBottomRadius(3px);
|
||||
}
|
||||
|
||||
.custom-select-value {
|
||||
border: medium none;
|
||||
height: 22px;
|
||||
width: 90%;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.custom-select-switch {
|
||||
float: right;
|
||||
width: 0;
|
||||
height: 0;
|
||||
margin-top: 11px;
|
||||
border-style: solid;
|
||||
border-width: 4px 4px 0 4px;
|
||||
border-color: #4c4c4c transparent transparent transparent;
|
||||
}
|
||||
|
||||
.custom-select-options {
|
||||
display: none;
|
||||
position: absolute;
|
||||
padding: 5px;
|
||||
background-color: white;
|
||||
border: 1px solid #c1c1c1;
|
||||
.borderRadius(2px);
|
||||
.boxShadow(1px, 1px, 8px, rgba(0,0,0,.2));
|
||||
z-index: 1000;
|
||||
|
||||
.custom-select-options-inner {
|
||||
max-height: 200px;
|
||||
padding-right: 20px;
|
||||
overflow-y: auto;
|
||||
|
||||
.custom-select-option {
|
||||
display: block;
|
||||
text-decoration: none;
|
||||
padding: 2px 14px 2px 4px;
|
||||
min-width: 50px;
|
||||
color: #666666;
|
||||
|
||||
&:hover {
|
||||
background-color: #e9e9e9;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&.selected {
|
||||
color: #2e94c9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.5 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
BIN
web/Content/images/toast_icon01.png
Normal file
After Width: | Height: | Size: 465 B |
BIN
web/Content/images/toast_icon02.png
Normal file
After Width: | Height: | Size: 431 B |
BIN
web/Content/images/toast_icon03.png
Normal file
After Width: | Height: | Size: 585 B |
@ -61,14 +61,14 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
.bottom-indent
|
||||
.bottom-indent-small
|
||||
{
|
||||
margin-bottom: 24px;
|
||||
margin-bottom: 18px;
|
||||
}
|
||||
|
||||
.bottom-indent-middle
|
||||
.bottom-indent
|
||||
{
|
||||
margin-bottom: 36px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.bottom-indent-big
|
||||
@ -190,14 +190,14 @@
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -32px -56px;
|
||||
background-position: -31px -57px;
|
||||
}
|
||||
|
||||
&.selected
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -6px -56px;
|
||||
background-position: -5px -57px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -205,31 +205,7 @@
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -58px -56px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.setup
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -32px -82px;
|
||||
}
|
||||
|
||||
&.selected
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -6px -82px;
|
||||
}
|
||||
}
|
||||
|
||||
&.disabled
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -58px -82px;
|
||||
background-position: -57px -57px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -238,14 +214,14 @@
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -32px -108px;
|
||||
background-position: -31px -83px;
|
||||
}
|
||||
|
||||
&.selected
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -6px -108px;
|
||||
background-position: -5px -83px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -253,7 +229,31 @@
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -58px -108px;
|
||||
background-position: -57px -83px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.setup
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -31px -109px;
|
||||
}
|
||||
|
||||
&.selected
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -5px -109px;
|
||||
}
|
||||
}
|
||||
|
||||
&.disabled
|
||||
{
|
||||
.icon
|
||||
{
|
||||
background-position: -57px -109px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -391,16 +391,16 @@
|
||||
border-bottom: 1px solid #c1c1c1;
|
||||
font-size: 18px;
|
||||
font-weight: 100;
|
||||
height: 24px;
|
||||
line-height: 24px;
|
||||
padding: 12px 24px;
|
||||
height: 14px;
|
||||
line-height: 14px;
|
||||
padding: 30px;
|
||||
}
|
||||
|
||||
.popup-error {
|
||||
float: left;
|
||||
margin-right: 8px;
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
margin: -5px 8px 0 0;
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
background-image: url("images/sprite.png");
|
||||
background-position: 0 0;
|
||||
background-repeat: no-repeat;
|
||||
@ -408,23 +408,31 @@
|
||||
|
||||
.popup-warning {
|
||||
float: left;
|
||||
margin-right: 8px;
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
margin: -5px 8px 0 0;
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
background-image: url("images/sprite.png");
|
||||
background-position: -52px 0;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.popup-close {
|
||||
float: right;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
background-image: url("images/sprite.png");
|
||||
background-position: 0 -182px;
|
||||
background-repeat: no-repeat;
|
||||
cursor: pointer;
|
||||
float: right;
|
||||
height: 26px;
|
||||
margin: -5px 0 0 8px;
|
||||
width: 26px;
|
||||
}
|
||||
|
||||
.popup-close:hover {
|
||||
background-position: -26px -182px;
|
||||
}
|
||||
|
||||
.popup-body {
|
||||
padding: 24px;
|
||||
padding: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -436,13 +444,13 @@
|
||||
background-image: url("images/step.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
height: 70px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.install-step {
|
||||
display: inline-block;
|
||||
float: left;
|
||||
text-align: center;
|
||||
width: 202px;
|
||||
width: 33%;
|
||||
}
|
||||
|
||||
.requirements-box {
|
||||
@ -548,40 +556,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.cp-feature {
|
||||
background-color: #f4f4f4;
|
||||
border: 1px solid #c5c5c5;
|
||||
height: 96px;
|
||||
text-align: center;
|
||||
width: 120px;
|
||||
.borderRadius(3px);
|
||||
|
||||
.icon {
|
||||
height: 42px;
|
||||
width: 42px;
|
||||
margin: 18px auto 4px;
|
||||
background-image: url("images/cp_features.png");
|
||||
background-repeat: no-repeat;
|
||||
background-position: center center;
|
||||
|
||||
&.https {
|
||||
background-position: center -308px;
|
||||
}
|
||||
|
||||
&.audit {
|
||||
background-position: center -176px;
|
||||
}
|
||||
|
||||
&.backup {
|
||||
background-position: center 0;
|
||||
}
|
||||
|
||||
&.update {
|
||||
background-position: center -132px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.git {
|
||||
background-image: url("images/sprite.png");
|
||||
background-repeat: no-repeat;
|
||||
@ -589,15 +563,4 @@
|
||||
height: 26px;
|
||||
line-height: 26px;
|
||||
padding-left: 32px;
|
||||
}
|
||||
|
||||
.coming-soon {
|
||||
background-image: url("images/coming_soon.png");
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
display: inline-block;
|
||||
height: 21px;
|
||||
margin-left: 4px;
|
||||
margin-top: 3px;
|
||||
width: 87px;
|
||||
}
|
@ -17,6 +17,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
@import "vars";
|
||||
|
||||
.toast-title {
|
||||
font-weight: bold;
|
||||
}
|
||||
@ -28,12 +30,11 @@
|
||||
|
||||
.toast-message a,
|
||||
.toast-message label {
|
||||
color: #ffffff;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.toast-message a:hover {
|
||||
color: #cccccc;
|
||||
text-decoration: none;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.toast-top-full-width {
|
||||
@ -54,13 +55,13 @@
|
||||
}
|
||||
|
||||
.toast-top-right {
|
||||
top: 142px;
|
||||
right: 12px;
|
||||
top: 75px;
|
||||
}
|
||||
|
||||
.toast-bottom-right {
|
||||
right: 12px;
|
||||
bottom: 102px;
|
||||
bottom: 12px;
|
||||
}
|
||||
|
||||
.toast-bottom-left {
|
||||
@ -72,61 +73,22 @@
|
||||
position: fixed;
|
||||
z-index: 999999;
|
||||
}
|
||||
|
||||
#toast-container * {
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
.toast-container {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#toast-container > div {
|
||||
margin: 0 0 6px;
|
||||
padding: 15px 15px 15px 50px;
|
||||
width: 300px;
|
||||
-moz-border-radius: 3px 3px 3px 3px;
|
||||
-webkit-border-radius: 3px 3px 3px 3px;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
#toast-container > div,
|
||||
.toast-container > div,
|
||||
.toast-popup-container > div {
|
||||
background-position: 15px center;
|
||||
background-repeat: no-repeat;
|
||||
-moz-box-shadow: 0 0 12px #999999;
|
||||
-webkit-box-shadow: 0 0 12px #999999;
|
||||
box-shadow: 0 0 12px #999999;
|
||||
color: #ffffff;
|
||||
opacity: 0.8;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
||||
filter: alpha(opacity=80);
|
||||
.borderRadius(3px);
|
||||
color: #000;
|
||||
margin: 0 0 6px;
|
||||
padding: 15px 15px 15px 50px;
|
||||
}
|
||||
|
||||
#toast-container > :hover {
|
||||
-moz-box-shadow: 0 0 12px #000000;
|
||||
-webkit-box-shadow: 0 0 12px #000000;
|
||||
box-shadow: 0 0 12px #000000;
|
||||
opacity: 1;
|
||||
-ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
||||
filter: alpha(opacity=100);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#toast-container > .toast-info {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGwSURBVEhLtZa9SgNBEMc9sUxxRcoUKSzSWIhXpFMhhYWFhaBg4yPYiWCXZxBLERsLRS3EQkEfwCKdjWJAwSKCgoKCcudv4O5YLrt7EzgXhiU3/4+b2ckmwVjJSpKkQ6wAi4gwhT+z3wRBcEz0yjSseUTrcRyfsHsXmD0AmbHOC9Ii8VImnuXBPglHpQ5wwSVM7sNnTG7Za4JwDdCjxyAiH3nyA2mtaTJufiDZ5dCaqlItILh1NHatfN5skvjx9Z38m69CgzuXmZgVrPIGE763Jx9qKsRozWYw6xOHdER+nn2KkO+Bb+UV5CBN6WC6QtBgbRVozrahAbmm6HtUsgtPC19tFdxXZYBOfkbmFJ1VaHA1VAHjd0pp70oTZzvR+EVrx2Ygfdsq6eu55BHYR8hlcki+n+kERUFG8BrA0BwjeAv2M8WLQBtcy+SD6fNsmnB3AlBLrgTtVW1c2QN4bVWLATaIS60J2Du5y1TiJgjSBvFVZgTmwCU+dAZFoPxGEEs8nyHC9Bwe2GvEJv2WXZb0vjdyFT4Cxk3e/kIqlOGoVLwwPevpYHT+00T+hWwXDf4AJAOUqWcDhbwAAAAASUVORK5CYII=") !important;
|
||||
}
|
||||
|
||||
#toast-container > .toast-error {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAHOSURBVEhLrZa/SgNBEMZzh0WKCClSCKaIYOED+AAKeQQLG8HWztLCImBrYadgIdY+gIKNYkBFSwu7CAoqCgkkoGBI/E28PdbLZmeDLgzZzcx83/zZ2SSXC1j9fr+I1Hq93g2yxH4iwM1vkoBWAdxCmpzTxfkN2RcyZNaHFIkSo10+8kgxkXIURV5HGxTmFuc75B2RfQkpxHG8aAgaAFa0tAHqYFfQ7Iwe2yhODk8+J4C7yAoRTWI3w/4klGRgR4lO7Rpn9+gvMyWp+uxFh8+H+ARlgN1nJuJuQAYvNkEnwGFck18Er4q3egEc/oO+mhLdKgRyhdNFiacC0rlOCbhNVz4H9FnAYgDBvU3QIioZlJFLJtsoHYRDfiZoUyIxqCtRpVlANq0EU4dApjrtgezPFad5S19Wgjkc0hNVnuF4HjVA6C7QrSIbylB+oZe3aHgBsqlNqKYH48jXyJKMuAbiyVJ8KzaB3eRc0pg9VwQ4niFryI68qiOi3AbjwdsfnAtk0bCjTLJKr6mrD9g8iq/S/B81hguOMlQTnVyG40wAcjnmgsCNESDrjme7wfftP4P7SP4N3CJZdvzoNyGq2c/HWOXJGsvVg+RA/k2MC/wN6I2YA2Pt8GkAAAAASUVORK5CYII=") !important;
|
||||
}
|
||||
|
||||
#toast-container > .toast-success {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADsSURBVEhLY2AYBfQMgf///3P8+/evAIgvA/FsIF+BavYDDWMBGroaSMMBiE8VC7AZDrIFaMFnii3AZTjUgsUUWUDA8OdAH6iQbQEhw4HyGsPEcKBXBIC4ARhex4G4BsjmweU1soIFaGg/WtoFZRIZdEvIMhxkCCjXIVsATV6gFGACs4Rsw0EGgIIH3QJYJgHSARQZDrWAB+jawzgs+Q2UO49D7jnRSRGoEFRILcdmEMWGI0cm0JJ2QpYA1RDvcmzJEWhABhD/pqrL0S0CWuABKgnRki9lLseS7g2AlqwHWQSKH4oKLrILpRGhEQCw2LiRUIa4lwAAAABJRU5ErkJggg==") !important;
|
||||
}
|
||||
|
||||
#toast-container > .toast-warning {
|
||||
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAGYSURBVEhL5ZSvTsNQFMbXZGICMYGYmJhAQIJAICYQPAACiSDB8AiICQQJT4CqQEwgJvYASAQCiZiYmJhAIBATCARJy+9rTsldd8sKu1M0+dLb057v6/lbq/2rK0mS/TRNj9cWNAKPYIJII7gIxCcQ51cvqID+GIEX8ASG4B1bK5gIZFeQfoJdEXOfgX4QAQg7kH2A65yQ87lyxb27sggkAzAuFhbbg1K2kgCkB1bVwyIR9m2L7PRPIhDUIXgGtyKw575yz3lTNs6X4JXnjV+LKM/m3MydnTbtOKIjtz6VhCBq4vSm3ncdrD2lk0VgUXSVKjVDJXJzijW1RQdsU7F77He8u68koNZTz8Oz5yGa6J3H3lZ0xYgXBK2QymlWWA+RWnYhskLBv2vmE+hBMCtbA7KX5drWyRT/2JsqZ2IvfB9Y4bWDNMFbJRFmC9E74SoS0CqulwjkC0+5bpcV1CZ8NMej4pjy0U+doDQsGyo1hzVJttIjhQ7GnBtRFN1UarUlH8F3xict+HY07rEzoUGPlWcjRFRr4/gChZgc3ZL2d8oAAAAASUVORK5CYII=") !important;
|
||||
}
|
||||
|
||||
#toast-container.toast-top-full-width > div,
|
||||
#toast-container.toast-bottom-full-width > div {
|
||||
width: 96%;
|
||||
margin: auto;
|
||||
#toast-container > div,
|
||||
.toast-popup-container > div {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.toast {
|
||||
@ -134,20 +96,76 @@
|
||||
}
|
||||
|
||||
.toast-success {
|
||||
background-color: #51a351;
|
||||
background-color: #cae796;
|
||||
}
|
||||
|
||||
.toast-error {
|
||||
background-color: #bd362f;
|
||||
background-color: #ffbfaa;
|
||||
}
|
||||
|
||||
.toast-info {
|
||||
background-color: #2f96b4;
|
||||
background-color: #f1da92;
|
||||
}
|
||||
|
||||
.toast-warning {
|
||||
background-color: #f89406;
|
||||
background-color: #F89406;
|
||||
}
|
||||
|
||||
#toast-container .toast-success:hover {
|
||||
background-color: #bcdf7e;
|
||||
}
|
||||
|
||||
#toast-container .toast-error:hover {
|
||||
background-color: #ffa98d;
|
||||
}
|
||||
|
||||
#toast-container .toast-info:hover {
|
||||
background-color: #eed27b;
|
||||
}
|
||||
|
||||
#toast-container > :hover {
|
||||
.boxShadow(1px, 2px, 4px, #D1D1D1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#toast-container > .toast-info,
|
||||
.toast-container > .toast-info,
|
||||
.toast-popup-container > .toast-info {
|
||||
background-image: url("images/toast_icon03.png");
|
||||
}
|
||||
|
||||
#toast-container > .toast-error,
|
||||
.toast-container > .toast-error,
|
||||
.toast-popup-container > .toast-error {
|
||||
background-image: url("images/toast_icon01.png");
|
||||
}
|
||||
|
||||
#toast-container > .toast-success,
|
||||
.toast-container > .toast-success,
|
||||
.toast-popup-container > .toast-success {
|
||||
background-image: url("images/toast_icon02.png");
|
||||
}
|
||||
|
||||
#toast-container > .toast-warning,
|
||||
.toast-container > .toast-warning,
|
||||
.toast-popup-container > .toast-warning {
|
||||
background-image: url("images/toast_icon01.png");
|
||||
}
|
||||
|
||||
/*Popup Toasts*/
|
||||
|
||||
.toast-popup-container .toast {
|
||||
width: auto;
|
||||
padding: 14px 0 14px 40px;
|
||||
background-position: 8px center;
|
||||
.borderRadius(0);
|
||||
margin-top:6px;
|
||||
}
|
||||
|
||||
.toast-popup-container .toast .toast-message {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
/*Responsive Design*/
|
||||
|
||||
@media all and (max-width: 240px) {
|
||||
@ -176,4 +194,11 @@
|
||||
padding: 15px 15px 15px 50px;
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
/* overrides */
|
||||
#toast-container.toast-top-full-width > div,
|
||||
#toast-container.toast-bottom-full-width > div {
|
||||
width: 100%;
|
||||
margin: 1px 0 1px 0;
|
||||
}
|
@ -18,10 +18,16 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Mail;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Web.Mvc;
|
||||
using ASC.Core.Billing;
|
||||
using OneClickInstallation.Classes;
|
||||
using OneClickInstallation.Helpers;
|
||||
using OneClickInstallation.Models;
|
||||
using OneClickInstallation.Resources;
|
||||
@ -41,12 +47,16 @@ namespace OneClickInstallation.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
public ActionResult Index()
|
||||
public ActionResult Index(string id)
|
||||
{
|
||||
var enterprise = !string.IsNullOrEmpty(id) && id.ToLowerInvariant() == "enterprise";
|
||||
|
||||
ConnectionSettingsModel connectionSettings = null;
|
||||
InstallationComponentsModel availableComponents = CacheHelper.GetAvailableComponents(enterprise);
|
||||
InstallationComponentsModel installedComponents = null;
|
||||
InstallationComponentsModel selectedComponents = null;
|
||||
InstallationProgressModel installationProgress = null;
|
||||
OsInfo osInfo = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(UserId))
|
||||
{
|
||||
@ -57,18 +67,27 @@ namespace OneClickInstallation.Controllers
|
||||
installedComponents = CacheHelper.GetInstalledComponents(UserId);
|
||||
selectedComponents = CacheHelper.GetSelectedComponents(UserId);
|
||||
installationProgress = CacheHelper.GetInstallationProgress(UserId);
|
||||
osInfo = CacheHelper.GetOsInfo(UserId);
|
||||
}
|
||||
else
|
||||
{
|
||||
CookieHelper.ClearCookie();
|
||||
CacheHelper.ClearCache(UserId);
|
||||
CacheHelper.ClearUserCache(UserId);
|
||||
}
|
||||
}
|
||||
|
||||
ViewBag.ConnectionSettings = GetJsonString(connectionSettings);
|
||||
ViewBag.AvailableComponents = GetJsonString(availableComponents);
|
||||
ViewBag.InstalledComponents = GetJsonString(installedComponents);
|
||||
ViewBag.SelectedComponents = GetJsonString(selectedComponents);
|
||||
ViewBag.InstallationProgress = GetJsonString(installationProgress);
|
||||
ViewBag.OsInfo = GetJsonString(osInfo);
|
||||
ViewBag.Enterprise = enterprise;
|
||||
|
||||
if (!string.IsNullOrEmpty(Settings.CacheKey) && Request.Params["cache"] == Settings.CacheKey)
|
||||
{
|
||||
CacheHelper.ClearCache();
|
||||
}
|
||||
|
||||
return View();
|
||||
}
|
||||
@ -78,16 +97,23 @@ namespace OneClickInstallation.Controllers
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Request.Files.Count <= 0)
|
||||
{
|
||||
if (Request.Files == null || Request.Files.Count <= 0)
|
||||
throw new Exception(OneClickCommonResource.ErrorFilesNotTransfered);
|
||||
|
||||
var savedFileName = FileHelper.SaveFile(Request.Files[0]);
|
||||
|
||||
bool isLicenseFile;
|
||||
|
||||
if (Boolean.TryParse(Request.Params["license"], out isLicenseFile))
|
||||
{
|
||||
if (isLicenseFile) ValidateLicenseFile(savedFileName);
|
||||
}
|
||||
|
||||
return Json(new
|
||||
{
|
||||
success = true,
|
||||
message = OneClickCommonResource.FileUploadedMsg,
|
||||
fileName = FileHelper.SaveFile(Request.Files[0])
|
||||
fileName = savedFileName
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -104,27 +130,41 @@ namespace OneClickInstallation.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public JsonResult Connect(ConnectionSettingsModel connectionSettings)
|
||||
public JsonResult Connect(ConnectionSettingsModel connectionSettings, RequestInfoModel requestInfo)
|
||||
{
|
||||
try
|
||||
{
|
||||
InstallationComponentsModel installedComponents = null;
|
||||
InstallationComponentsModel selectedComponents = null;
|
||||
InstallationProgressModel installationProgress = null;
|
||||
OsInfo osInfo = null;
|
||||
|
||||
if (connectionSettings != null)
|
||||
{
|
||||
installedComponents = SshHelper.Connect(UserId, connectionSettings);
|
||||
if (connectionSettings.Enterprise)
|
||||
{
|
||||
if (string.IsNullOrEmpty(connectionSettings.LicenseKey))
|
||||
throw new ArgumentException("connectionSettings.licenseKey");
|
||||
|
||||
if (connectionSettings.LicenseKey == Settings.TrialFileName && requestInfo == null)
|
||||
throw new ArgumentNullException("requestInfo");
|
||||
}
|
||||
|
||||
var data = SshHelper.Connect(UserId, connectionSettings);
|
||||
|
||||
osInfo = data.Item1;
|
||||
installedComponents = data.Item2;
|
||||
installationProgress = CacheHelper.GetInstallationProgress(UserId);
|
||||
selectedComponents = CacheHelper.GetSelectedComponents(UserId);
|
||||
|
||||
CacheHelper.SetConnectionSettings(UserId, connectionSettings);
|
||||
CacheHelper.SetInstalledComponents(UserId, installedComponents);
|
||||
CacheHelper.SetRequestInfo(UserId, requestInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
CookieHelper.ClearCookie();
|
||||
CacheHelper.ClearCache(UserId);
|
||||
CacheHelper.ClearUserCache(UserId);
|
||||
}
|
||||
|
||||
return Json(new
|
||||
@ -134,7 +174,8 @@ namespace OneClickInstallation.Controllers
|
||||
connectionSettings = GetJsonString(connectionSettings),
|
||||
installedComponents = GetJsonString(installedComponents),
|
||||
installationProgress = GetJsonString(installationProgress),
|
||||
selectedComponents = GetJsonString(selectedComponents)
|
||||
selectedComponents = GetJsonString(selectedComponents),
|
||||
osInfo = GetJsonString(osInfo)
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -151,27 +192,26 @@ namespace OneClickInstallation.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public JsonResult StartInstall(ConnectionSettingsModel connectionSettings, InstallationComponentsModel installationComponents)
|
||||
public JsonResult StartInstall(InstallationComponentsModel installationComponents)
|
||||
{
|
||||
try
|
||||
{
|
||||
var connectionSettings = CacheHelper.GetConnectionSettings(UserId);
|
||||
var installedComponents = CacheHelper.GetInstalledComponents(UserId);
|
||||
|
||||
if (installedComponents != null)
|
||||
return Json(new
|
||||
{
|
||||
success = false,
|
||||
message = OneClickHomePageResource.ExistVersionErrorText
|
||||
});
|
||||
if (connectionSettings.Enterprise && connectionSettings.LicenseKey == Settings.TrialFileName && !string.IsNullOrEmpty(Settings.LicenseUrl))
|
||||
{
|
||||
if (installedComponents != null && installedComponents.LicenseFileExist)
|
||||
throw new Exception(OneClickCommonResource.ErrorLicenseFileExist);
|
||||
|
||||
if (!installationComponents.CommunityServer || !installationComponents.DocumentServer)
|
||||
return Json(new
|
||||
{
|
||||
success = false,
|
||||
message = OneClickCommonResource.ErrorRequiredComponents
|
||||
});
|
||||
connectionSettings = RequestLicenseFile(connectionSettings, CacheHelper.GetRequestInfo(UserId));
|
||||
}
|
||||
|
||||
if (installationComponents.MailServer && !ValidateDomainName(installationComponents.MailDomain))
|
||||
var mailServerAlreadyInstalled = installedComponents != null &&
|
||||
!string.IsNullOrEmpty(installedComponents.MailServerVersion);
|
||||
|
||||
if (!mailServerAlreadyInstalled && !string.IsNullOrEmpty(installationComponents.MailServerVersion) &&
|
||||
!ValidateDomainName(installationComponents.MailDomain))
|
||||
return Json(new
|
||||
{
|
||||
success = false,
|
||||
@ -179,6 +219,7 @@ namespace OneClickInstallation.Controllers
|
||||
});
|
||||
|
||||
CacheHelper.SetSelectedComponents(UserId, installationComponents);
|
||||
|
||||
CacheHelper.SetInstallationProgress(UserId, new InstallationProgressModel());
|
||||
|
||||
SshHelper.StartInstallation(UserId, connectionSettings, installationComponents);
|
||||
@ -198,10 +239,18 @@ namespace OneClickInstallation.Controllers
|
||||
CacheHelper.SetSelectedComponents(UserId, null);
|
||||
CacheHelper.SetInstallationProgress(UserId, null);
|
||||
|
||||
var code = 0;
|
||||
|
||||
if (ex is ExternalException)
|
||||
{
|
||||
Int32.TryParse(Regex.Match(ex.Message, @"[\d+]").Value, out code);
|
||||
}
|
||||
|
||||
return Json(new
|
||||
{
|
||||
success = false,
|
||||
message = ex.Message
|
||||
message = ex.Message,
|
||||
errorCode = code > 0 ? "External" + code : "unknown"
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -233,7 +282,7 @@ namespace OneClickInstallation.Controllers
|
||||
errorCode = 0,
|
||||
errorMessage = string.Empty,
|
||||
progressText = Settings.DebugMode ? progress.ProgressText : string.Empty,
|
||||
installedComponents = GetJsonString(progress.IsCompleted ? CacheHelper.GetInstalledComponents(UserId) : null),
|
||||
installedComponents = GetJsonString(progress.IsCompleted ? CacheHelper.GetInstalledComponents(UserId) : null)
|
||||
}, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
|
||||
@ -247,7 +296,8 @@ namespace OneClickInstallation.Controllers
|
||||
step = (int)progress.Step,
|
||||
errorCode = GetErrorCode(progress.ErrorMessage),
|
||||
errorMessage = progress.ErrorMessage,
|
||||
progressText = progress.ProgressText
|
||||
progressText = progress.ProgressText,
|
||||
installedComponents = GetJsonString(CacheHelper.GetInstalledComponents(UserId))
|
||||
}, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -264,60 +314,12 @@ namespace OneClickInstallation.Controllers
|
||||
step = (int)progress.Step,
|
||||
errorCode = 0,
|
||||
errorMessage = ex.Message,
|
||||
progressText = progress.ProgressText
|
||||
progressText = progress.ProgressText,
|
||||
installedComponents = GetJsonString(CacheHelper.GetInstalledComponents(UserId))
|
||||
}, JsonRequestBehavior.AllowGet);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
public JsonResult SendEmail(string email)
|
||||
{
|
||||
try
|
||||
{
|
||||
var targetEmail = new MailAddress(email);
|
||||
|
||||
var emailSender = Settings.EmailSender;
|
||||
|
||||
if(emailSender == null)
|
||||
throw new Exception(OneClickCommonResource.EmailSenderIsNull);
|
||||
|
||||
var mail = new MailMessage();
|
||||
|
||||
var client = new SmtpClient
|
||||
{
|
||||
Host = emailSender.Host,
|
||||
Port = emailSender.Port,
|
||||
Timeout = 10000,
|
||||
EnableSsl = emailSender.EnableSsl,
|
||||
DeliveryMethod = SmtpDeliveryMethod.Network,
|
||||
UseDefaultCredentials = false,
|
||||
Credentials = new NetworkCredential(emailSender.Email.Split('@')[0], emailSender.Password)
|
||||
};
|
||||
|
||||
mail.To.Add(new MailAddress(Settings.SupportEmail));
|
||||
mail.From = new MailAddress(emailSender.Email);
|
||||
mail.Subject = OneClickJsResource.NotyfyEmailSubject;
|
||||
mail.Body = string.Format(OneClickJsResource.NotyfyEmailBody, targetEmail.Address);
|
||||
|
||||
client.Send(mail);
|
||||
|
||||
return Json(new
|
||||
{
|
||||
success = true,
|
||||
message = OneClickJsResource.EmailSendedMsg,
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogManager.GetLogger("ASC").Error(ex.Message, ex);
|
||||
|
||||
return Json(new
|
||||
{
|
||||
success = false,
|
||||
message = ex.Message
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private string GetJsonString(object obj)
|
||||
{
|
||||
@ -354,5 +356,59 @@ namespace OneClickInstallation.Controllers
|
||||
var regex = new Regex(@"(?=^.{5,254}$)(^(?:(?!\d+\.)[a-zA-Z0-9_\-]{1,63}\.?)+\.(?:[a-zA-Z]{2,})$)", RegexOptions.Compiled | RegexOptions.IgnoreCase);
|
||||
return regex.IsMatch(domainName);
|
||||
}
|
||||
|
||||
private void ValidateLicenseFile(string fileName)
|
||||
{
|
||||
var filePath = FileHelper.GetFile(fileName);
|
||||
|
||||
var ext = Path.GetExtension(filePath);
|
||||
|
||||
if (string.IsNullOrEmpty(ext) || ext.ToLower() != ".lic")
|
||||
{
|
||||
FileHelper.RemoveFile(filePath);
|
||||
throw new Exception(OneClickCommonResource.ErrorFileExt);
|
||||
}
|
||||
|
||||
//TODO: LicenseReader.CheckValid new .dll
|
||||
|
||||
//if (LicenseReader.CheckValid(filePath)) return;
|
||||
|
||||
//FileHelper.RemoveFile(filePath);
|
||||
//throw new Exception(OneClickCommonResource.ErrorLicenseFileNotValid);
|
||||
}
|
||||
|
||||
private ConnectionSettingsModel RequestLicenseFile(ConnectionSettingsModel connectionSettings, RequestInfoModel requestInfo)
|
||||
{
|
||||
if(requestInfo == null)
|
||||
throw new Exception(OneClickCommonResource.ErrorRequestInfoIsNull);
|
||||
|
||||
using (var client = new WebClient())
|
||||
{
|
||||
var values = new NameValueCollection();
|
||||
|
||||
values["Host"] = connectionSettings.Host;
|
||||
values["FName"] = requestInfo.Name;
|
||||
values["Email"] = requestInfo.Email;
|
||||
values["Phone"] = requestInfo.Phone;
|
||||
values["CompanyName"] = requestInfo.CompanyName;
|
||||
values["CompanySize"] = requestInfo.CompanySize.ToString(CultureInfo.InvariantCulture);
|
||||
values["Position"] = requestInfo.Position;
|
||||
|
||||
var response = client.UploadValues(Settings.LicenseUrl, values);
|
||||
|
||||
var responseString = Encoding.Default.GetString(response).Replace("\"", string.Empty);
|
||||
|
||||
if(responseString.Contains("error"))
|
||||
throw new ExternalException(responseString);
|
||||
|
||||
var licenseFileName = FileHelper.SaveFile(responseString);
|
||||
|
||||
connectionSettings.LicenseKey = licenseFileName;
|
||||
|
||||
CacheHelper.SetConnectionSettings(UserId, connectionSettings);
|
||||
|
||||
return connectionSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -24,9 +24,9 @@ using System.Globalization;
|
||||
using System.Resources;
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using OneClickInstallation.Helpers;
|
||||
using OneClickInstallation.Resources;
|
||||
using TMResourceData;
|
||||
|
||||
namespace OneClickInstallation.Controllers
|
||||
{
|
||||
@ -82,22 +82,13 @@ namespace OneClickInstallation.Controllers
|
||||
var script = string.Empty;
|
||||
foreach (var pair in resources)
|
||||
{
|
||||
var set = pair.Item1.GetResourceSet(new CultureInfo(culture), true, true);
|
||||
var baseSet = pair.Item1.GetResourceSet(new CultureInfo(LangHelper.DefaultLanguage), true, true);
|
||||
|
||||
var dbManager = pair.Item1 as DBResourceManager;
|
||||
var baseNeutral = baseSet;
|
||||
|
||||
if (dbManager != null)
|
||||
{
|
||||
baseNeutral = dbManager.GetBaseNeutralResourceSet();
|
||||
}
|
||||
|
||||
var baseSet = pair.Item1.GetResourceSet(CultureInfo.InvariantCulture, true, true);
|
||||
var js = new StringBuilder(pair.Item2 + "={");
|
||||
foreach (DictionaryEntry entry in baseNeutral)
|
||||
foreach (DictionaryEntry entry in baseSet)
|
||||
{
|
||||
var value = set.GetString((string)entry.Key) ?? baseSet.GetString((string)entry.Key) ?? baseNeutral.GetString((string)entry.Key) ?? string.Empty;
|
||||
js.AppendFormat("\"{0}\":\"{1}\",", entry.Key, (value).Replace("\"", "\\\""));
|
||||
var key = (string)entry.Key;
|
||||
var value = pair.Item1.GetString(key, new CultureInfo(culture)) ?? string.Empty;
|
||||
js.AppendFormat("\"{0}\":{1},", entry.Key, JsonConvert.SerializeObject(value));
|
||||
}
|
||||
|
||||
script += js.ToString();
|
||||
|
@ -13,172 +13,171 @@
|
||||
|
||||
DIST=${1}
|
||||
REV=${2}
|
||||
ARCH_TYPE=${3}
|
||||
KERNEL=${4}
|
||||
IS_REBOOT=${5:-false}
|
||||
|
||||
EXIT_STATUS=-1;
|
||||
EXIT_NOT_SUPPORTED_OS_STATUS=10;
|
||||
KERNEL=${3}
|
||||
ARCH_TYPE=${4}
|
||||
|
||||
|
||||
command_exists () {
|
||||
type "$1" &> /dev/null ;
|
||||
|
||||
check_os_info () {
|
||||
if [[ -z ${DIST} || -z ${REV} || -z ${KERNEL} || -z ${ARCH_TYPE} ]]; then
|
||||
echo "Not supported OS"
|
||||
echo "INSTALLATION-STOP-ERROR[2]"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
if [ "${ARCH_TYPE}" != "x86_64" ]; then
|
||||
echo "Currently only supports 64bit OS's";
|
||||
echo "INSTALLATION-STOP-ERROR[1]"
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
if command_exists docker ; then
|
||||
echo "docker is already installed."
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
fi
|
||||
check_kernel () {
|
||||
MIN_NUM_ARR=(3 10 0);
|
||||
CUR_NUM_ARR=();
|
||||
|
||||
CUR_STR_ARR=$(echo $KERNEL | grep -Po "[0-9]+\.[0-9]+\.[0-9]+" | tr "." " ");
|
||||
for CUR_STR_ITEM in $CUR_STR_ARR
|
||||
do
|
||||
CUR_NUM_ARR=(${CUR_NUM_ARR[@]} $CUR_STR_ITEM)
|
||||
done
|
||||
|
||||
if [ "${ARCH_TYPE}" != "x86_64" ]; then
|
||||
echo "Currently only supports 64bit OS's";
|
||||
echo "INSTALLATION-STOP-ERROR[1]"
|
||||
exit 0;
|
||||
fi
|
||||
INDEX=0;
|
||||
|
||||
REV_PARTS=(${REV//\./ })
|
||||
REV=${REV_PARTS[0]}
|
||||
|
||||
if [ "${DIST}" == "Ubuntu" ]; then
|
||||
|
||||
if [ "${REV}" -ge "14" ]; then
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y upgrade
|
||||
sudo apt-get -y -q --force-yes install curl
|
||||
sudo curl -sSL https://get.docker.com/ | sh
|
||||
elif [ "${REV}" -eq "13" ]; then
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y upgrade
|
||||
sudo apt-get -y install linux-image-extra-`uname -r`
|
||||
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
|
||||
sudo sh -c "echo deb http://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y install lxc-docker
|
||||
elif [ "${REV}" -eq "12" ]; then
|
||||
# install the backported kernel
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y -q --force-yes install linux-image-generic-lts-trusty
|
||||
|
||||
# reboot
|
||||
if [ "${IS_REBOOT}" == "false" ] ; then
|
||||
echo "INSTALLATION-STOP-REBOOT"
|
||||
while [[ $INDEX -lt 3 ]]; do
|
||||
if [ ${CUR_NUM_ARR[INDEX]} -lt ${MIN_NUM_ARR[INDEX]} ]; then
|
||||
echo "Not supported OS Kernel"
|
||||
echo "INSTALLATION-STOP-ERROR[7]"
|
||||
exit 0;
|
||||
elif [ ${CUR_NUM_ARR[INDEX]} -gt ${MIN_NUM_ARR[INDEX]} ]; then
|
||||
INDEX=3
|
||||
fi
|
||||
|
||||
sudo apt-get -y -q --force-yes update
|
||||
sudo apt-get -y -q --force-yes install wget
|
||||
sudo wget -qO- https://get.docker.com/ | sh
|
||||
|
||||
(( INDEX++ ))
|
||||
done
|
||||
}
|
||||
|
||||
command_exists () {
|
||||
type "$1" &> /dev/null;
|
||||
}
|
||||
|
||||
check_docker_version () {
|
||||
MIN_NUM_ARR=(1 10 0);
|
||||
CUR_NUM_ARR=();
|
||||
|
||||
CUR_STR_ARR=$(docker -v | grep -Po "[0-9]+\.[0-9]+\.[0-9]+" | tr "." " ");
|
||||
for CUR_STR_ITEM in $CUR_STR_ARR
|
||||
do
|
||||
CUR_NUM_ARR=(${CUR_NUM_ARR[@]} $CUR_STR_ITEM)
|
||||
done
|
||||
|
||||
NEED_UPDATE="false"
|
||||
INDEX=0;
|
||||
|
||||
while [[ $INDEX -lt 3 ]]; do
|
||||
if [ ${CUR_NUM_ARR[INDEX]} -lt ${MIN_NUM_ARR[INDEX]} ]; then
|
||||
NEED_UPDATE="true"
|
||||
INDEX=3
|
||||
elif [ ${CUR_NUM_ARR[INDEX]} -gt ${MIN_NUM_ARR[INDEX]} ]; then
|
||||
INDEX=3
|
||||
fi
|
||||
(( INDEX++ ))
|
||||
done
|
||||
|
||||
echo "$NEED_UPDATE"
|
||||
}
|
||||
|
||||
uninstall_docker () {
|
||||
|
||||
if [ "${DIST}" == "Ubuntu" ] || [ "${DIST}" == "Debian" ]; then
|
||||
|
||||
sudo apt-get -y autoremove --purge docker-engine
|
||||
|
||||
elif [[ "${DIST}" == CentOS* ]] || [ "${DIST}" == "Red Hat Enterprise Linux Server" ]; then
|
||||
|
||||
sudo yum -y remove docker-engine.x86_64
|
||||
|
||||
elif [ "${DIST}" == "SuSe" ]; then
|
||||
|
||||
sudo zypper rm -y docker
|
||||
|
||||
elif [ "${DIST}" == "Fedora" ]; then
|
||||
|
||||
sudo dnf -y remove docker-engine.x86_64
|
||||
|
||||
else
|
||||
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
|
||||
echo "Not supported OS"
|
||||
echo "INSTALLATION-STOP-ERROR[2]"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
elif [ "${DIST}" == "Debian" ]; then
|
||||
|
||||
if [ "${REV}" -ge "8" ]; then
|
||||
}
|
||||
|
||||
install_docker () {
|
||||
|
||||
if [ "${DIST}" == "Ubuntu" ] || [ "${DIST}" == "Debian" ]; then
|
||||
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y upgrade
|
||||
sudo apt-get -y -q --force-yes install curl
|
||||
sudo apt-get -y -q install curl
|
||||
sudo curl -sSL https://get.docker.com/ | sh
|
||||
elif [ "${REV}" -eq "7" ]; then
|
||||
echo "deb http://http.debian.net/debian wheezy-backports main" >> /etc/apt/sources.list
|
||||
sudo apt-get -y update
|
||||
sudo apt-get -y upgrade
|
||||
sudo apt-get -y -q --force-yes install curl
|
||||
sudo apt-get -y -q --force-yes install -t wheezy-backports linux-image-amd64
|
||||
|
||||
# reboot
|
||||
if [ "${IS_REBOOT}" == "false" ] ; then
|
||||
echo "INSTALLATION-STOP-REBOOT"
|
||||
exit 0;
|
||||
fi
|
||||
elif [[ "${DIST}" == CentOS* ]] || [ "${DIST}" == "Red Hat Enterprise Linux Server" ]; then
|
||||
|
||||
curl -sSL https://get.docker.com/ | sh
|
||||
else
|
||||
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
|
||||
fi
|
||||
|
||||
elif [[ "${DIST}" == CentOS* ]] || [ "${DIST}" == "Red Hat Enterprise Linux Server" ]; then
|
||||
|
||||
if [ "${REV}" -ge "7" ]; then
|
||||
|
||||
if [ "${DIST}" == "Red Hat Enterprise Linux Server" ]; then
|
||||
sudo yum -y install yum-utils
|
||||
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras
|
||||
fi
|
||||
|
||||
sudo yum -y update
|
||||
sudo yum -y upgrade
|
||||
sudo yum -y install docker
|
||||
sudo setenforce 0
|
||||
sudo systemctl stop firewalld.service
|
||||
sudo systemctl disable firewalld.service
|
||||
sudo systemctl start docker.service
|
||||
sudo systemctl enable docker.service
|
||||
elif [ "${REV}" -eq "6" ]; then
|
||||
sudo yum -y update
|
||||
sudo yum -y upgrade
|
||||
sudo yum -y install epel-release
|
||||
sudo yum -y install docker-io
|
||||
sudo yum -y install curl
|
||||
sudo curl -fsSL https://get.docker.com/ | sh
|
||||
sudo service docker start
|
||||
sudo chkconfig docker on
|
||||
else
|
||||
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
|
||||
fi
|
||||
|
||||
elif [ "${DIST}" == "SuSe" ]; then
|
||||
|
||||
if [ "${REV}" -ge "13" ]; then
|
||||
sudo zypper ar -f http://download.opensuse.org/repositories/Virtualization/openSUSE_13.1/ Virtualization
|
||||
sudo zypper --non-interactive in docker
|
||||
|
||||
elif [ "${DIST}" == "SuSe" ]; then
|
||||
|
||||
sudo zypper in -y docker
|
||||
sudo systemctl start docker
|
||||
sudo systemctl enable docker
|
||||
elif [ "${REV}" -ge "12" ]; then
|
||||
sudo zypper ar -f http://download.opensuse.org/repositories/Virtualization/openSUSE_12.3/ Virtualization
|
||||
sudo zypper --non-interactive in docker
|
||||
sudo systemctl start docker
|
||||
sudo systemctl enable docker
|
||||
else
|
||||
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
|
||||
fi
|
||||
|
||||
elif [ "${DIST}" == "Fedora" ]; then
|
||||
|
||||
if [ "${REV}" -ge "21" ]; then
|
||||
|
||||
elif [ "${DIST}" == "Fedora" ]; then
|
||||
|
||||
sudo dnf -y update
|
||||
sudo yum -y update
|
||||
sudo yum -y upgrade
|
||||
sudo yum -y install docker
|
||||
sudo setenforce 0
|
||||
sudo systemctl start docker
|
||||
sudo systemctl enable docker
|
||||
elif [ "${REV}" -eq "20" ]; then
|
||||
sudo yum -y update
|
||||
sudo yum -y upgrade
|
||||
sudo yum -y remove docker
|
||||
sudo yum -y install docker-io
|
||||
sudo yum -y install curl
|
||||
sudo curl -fsSL https://get.docker.com/ | sh
|
||||
sudo systemctl start docker
|
||||
sudo systemctl enable docker
|
||||
|
||||
else
|
||||
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
|
||||
echo "Not supported OS"
|
||||
echo "INSTALLATION-STOP-ERROR[2]"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
else
|
||||
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
|
||||
fi
|
||||
if ! command_exists docker ; then
|
||||
echo "Error while installing docker"
|
||||
echo "INSTALLATION-STOP-ERROR[6]"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
echo "Docker successfully installed"
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if [ ${EXIT_STATUS} -eq ${EXIT_NOT_SUPPORTED_OS_STATUS} ]; then
|
||||
echo "Not supported OS"
|
||||
echo "INSTALLATION-STOP-ERROR[2]"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
|
||||
check_os_info
|
||||
|
||||
check_kernel
|
||||
|
||||
if command_exists docker ; then
|
||||
echo "docker successfully installed."
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
fi
|
||||
NEED_UPDATE=$(check_docker_version);
|
||||
|
||||
echo "error while installing docker."
|
||||
echo "INSTALLATION-STOP-ERROR[6]"
|
||||
if [ "$NEED_UPDATE" == "true" ]; then
|
||||
uninstall_docker
|
||||
install_docker
|
||||
else
|
||||
echo "Docker successfully installed"
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
fi
|
||||
else
|
||||
install_docker
|
||||
fi
|
||||
|
@ -14,18 +14,21 @@
|
||||
COMMUNITY_CONTAINER_NAME="onlyoffice-community-server";
|
||||
DOCUMENT_CONTAINER_NAME="onlyoffice-document-server";
|
||||
MAIL_CONTAINER_NAME="onlyoffice-mail-server";
|
||||
CONTROLPANEL_CONTAINER_NAME="onlyoffice-controlpanel";
|
||||
CONTROLPANEL_CONTAINER_NAME="onlyoffice-control-panel";
|
||||
|
||||
COMMUNITY_IMAGE_NAME="onlyoffice/communityserver";
|
||||
DOCUMENT_IMAGE_NAME="onlyoffice/documentserver";
|
||||
COMMUNITY_IMAGE_NAME="onlyoffice4enterprise/communityserver-ee";
|
||||
DOCUMENT_IMAGE_NAME="onlyoffice4enterprise/documentserver-ee";
|
||||
MAIL_IMAGE_NAME="onlyoffice/mailserver";
|
||||
CONTROLPANEL_IMAGE_NAME="onlyoffice/controlpanel";
|
||||
CONTROLPANEL_IMAGE_NAME="onlyoffice4enterprise/controlpanel-ee";
|
||||
|
||||
COMMUNITY_VERSION="";
|
||||
DOCUMENT_VERSION="";
|
||||
MAIL_VERSION="";
|
||||
CONTROLPANEL_VERSION="";
|
||||
|
||||
MAIL_SERVER_HOST="";
|
||||
DOCUMENT_SERVER_HOST="";
|
||||
|
||||
LICENSE_FILE_PATH="";
|
||||
MAIL_DOMAIN_NAME="";
|
||||
|
||||
@ -50,6 +53,7 @@ PULL_DOCUMENT_SERVER="false"
|
||||
PULL_MAIL_SERVER="false"
|
||||
PULL_CONTROLPANEL="false"
|
||||
|
||||
USE_AS_EXTERNAL_SERVER="false"
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
@ -110,6 +114,20 @@ while [ "$1" != "" ]; do
|
||||
fi
|
||||
;;
|
||||
|
||||
-dip | --documentserverip )
|
||||
if [ "$2" != "" ]; then
|
||||
DOCUMENT_SERVER_HOST=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-mip | --mailserverip )
|
||||
if [ "$2" != "" ]; then
|
||||
MAIL_SERVER_HOST=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-cv | --communityversion )
|
||||
if [ "$2" != "" ]; then
|
||||
COMMUNITY_VERSION=$2
|
||||
@ -242,7 +260,14 @@ while [ "$1" != "" ]; do
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
-es | --useasexternalserver )
|
||||
if [ "$2" != "" ]; then
|
||||
USE_AS_EXTERNAL_SERVER=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
@ -256,7 +281,9 @@ while [ "$1" != "" ]; do
|
||||
echo " -cpi, --controlpanelimage control panel image name"
|
||||
echo " -cv, --communityversion community version"
|
||||
echo " -dv, --documentversion document version"
|
||||
echo " -dip, --documentserverip document server ip"
|
||||
echo " -mv, --mailversion mail version"
|
||||
echo " -mip, --mailserverip mail server ip"
|
||||
echo " -cpv, --controlpanelversion control panel version"
|
||||
echo " -lf, --licensefile license file path"
|
||||
echo " -md, --maildomain mail domail name"
|
||||
@ -273,6 +300,7 @@ while [ "$1" != "" ]; do
|
||||
echo " -pds, --pulldocumentserver pull document server (true|false)"
|
||||
echo " -pms, --pullmailserver pull mail server (true|false)"
|
||||
echo " -pcp, --pullcontrolpanel pull control panel (true|false)"
|
||||
echo " -es, --useasexternalserver use as external server (true|false)"
|
||||
echo " -?, -h, --help this help"
|
||||
echo
|
||||
exit 0
|
||||
@ -710,6 +738,7 @@ check_bindings () {
|
||||
install_document_server () {
|
||||
|
||||
DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
|
||||
DOCUMENT_SERVER_ADDITIONAL_PORTS="";
|
||||
|
||||
if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
|
||||
if [ "$UPDATE" == "true" ]; then
|
||||
@ -726,7 +755,10 @@ install_document_server () {
|
||||
DOCUMENT_VERSION=$(get_available_version "$DOCUMENT_IMAGE_NAME");
|
||||
fi
|
||||
|
||||
sudo docker run -i -t -d --restart=always --name ${DOCUMENT_CONTAINER_NAME} \
|
||||
if [ "${USE_AS_EXTERNAL_SERVER}" == "true" ]; then
|
||||
DOCUMENT_SERVER_ADDITIONAL_PORTS="-p 80:80 -p 443:443";
|
||||
fi
|
||||
sudo docker run -i -t -d --restart=always --name ${DOCUMENT_CONTAINER_NAME} ${DOCUMENT_SERVER_ADDITIONAL_PORTS} \
|
||||
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
|
||||
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
|
||||
${DOCUMENT_IMAGE_NAME}:${DOCUMENT_VERSION}
|
||||
@ -742,6 +774,8 @@ install_document_server () {
|
||||
install_mail_server () {
|
||||
MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
|
||||
|
||||
MAIL_SERVER_ADDITIONAL_PORTS="";
|
||||
|
||||
if [[ -n ${MAIL_SERVER_ID} ]]; then
|
||||
if [ "$UPDATE" == "true" ]; then
|
||||
check_bindings $MAIL_SERVER_ID;
|
||||
@ -756,28 +790,31 @@ install_mail_server () {
|
||||
if [[ -z ${MAIL_VERSION} ]]; then
|
||||
MAIL_VERSION=$(get_available_version "$MAIL_IMAGE_NAME");
|
||||
fi
|
||||
|
||||
|
||||
if [ "${USE_AS_EXTERNAL_SERVER}" == "true" ]; then
|
||||
MAIL_SERVER_ADDITIONAL_PORTS="-p 3306:3306 -p 8081:8081";
|
||||
fi
|
||||
|
||||
RUN_COMMAND="sudo docker run --privileged -i -t -d --restart=always --name ${MAIL_CONTAINER_NAME} ${MAIL_SERVER_ADDITIONAL_PORTS} -p 25:25 -p 143:143 -p 587:587";
|
||||
RUN_COMMAND="${RUN_COMMAND} -v /app/onlyoffice/MailServer/data:/var/vmail";
|
||||
RUN_COMMAND="${RUN_COMMAND} -v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver";
|
||||
RUN_COMMAND="${RUN_COMMAND} -v /app/onlyoffice/MailServer/logs:/var/log";
|
||||
RUN_COMMAND="${RUN_COMMAND} -v /app/onlyoffice/MailServer/mysql:/var/lib/mysql";
|
||||
|
||||
if [ "$UPDATE" != "true" ]; then
|
||||
|
||||
if [[ -z ${MAIL_DOMAIN_NAME} ]]; then
|
||||
echo "Please, set domain name for mail server"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
sudo docker run --privileged -i -t -d --restart=always --name ${MAIL_CONTAINER_NAME} -p 25:25 -p 143:143 -p 587:587 \
|
||||
-v /app/onlyoffice/MailServer/data:/var/vmail \
|
||||
-v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
|
||||
-v /app/onlyoffice/MailServer/logs:/var/log -v \
|
||||
/app/onlyoffice/MailServer/mysql:/var/lib/mysql -h ${MAIL_DOMAIN_NAME} ${MAIL_IMAGE_NAME}:${MAIL_VERSION}
|
||||
|
||||
|
||||
RUN_COMMAND="${RUN_COMMAND} -h ${MAIL_DOMAIN_NAME} ${MAIL_IMAGE_NAME}:${MAIL_VERSION}";
|
||||
else
|
||||
sudo docker run --privileged -i -t -d --restart=always --name ${MAIL_CONTAINER_NAME} -p 25:25 -p 143:143 -p 587:587 \
|
||||
-v /app/onlyoffice/MailServer/data:/var/vmail \
|
||||
-v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
|
||||
-v /app/onlyoffice/MailServer/logs:/var/log -v \
|
||||
/app/onlyoffice/MailServer/mysql:/var/lib/mysql ${MAIL_IMAGE_NAME}:${MAIL_VERSION}
|
||||
RUN_COMMAND="${RUN_COMMAND} ${MAIL_IMAGE_NAME}:${MAIL_VERSION}";
|
||||
fi
|
||||
|
||||
${RUN_COMMAND};
|
||||
|
||||
MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
|
||||
|
||||
if [[ -z ${MAIL_SERVER_ID} ]]; then
|
||||
@ -789,6 +826,8 @@ install_mail_server () {
|
||||
install_controlpanel () {
|
||||
CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
|
||||
|
||||
CONTROLPANEL_ADDITIONS_PARAMS="";
|
||||
|
||||
if [[ -n ${CONTROL_PANEL_ID} ]]; then
|
||||
if [ "$UPDATE" == "true" ]; then
|
||||
check_bindings $CONTROL_PANEL_ID;
|
||||
@ -804,7 +843,19 @@ install_controlpanel () {
|
||||
CONTROLPANEL_VERSION=$(get_available_version "$CONTROLPANEL_IMAGE_NAME");
|
||||
fi
|
||||
|
||||
sudo docker run -i -t -d --restart=always --name ${CONTROLPANEL_CONTAINER_NAME} \
|
||||
if [[ -n ${MAIL_SERVER_HOST} ]]; then
|
||||
CONTROLPANEL_ADDITIONS_PARAMS="${CONTROLPANEL_ADDITIONS_PARAMS} -e MAIL_SERVER_EXTERNAL=true";
|
||||
fi
|
||||
|
||||
if [[ -n ${DOCUMENT_SERVER_HOST} ]]; then
|
||||
CONTROLPANEL_ADDITIONS_PARAMS="${CONTROLPANEL_ADDITIONS_PARAMS} -e DOCUMENT_SERVER_EXTERNAL=true";
|
||||
fi
|
||||
|
||||
if [[ -n ${COMMUNITY_SERVER_HOST} ]]; then
|
||||
CONTROLPANEL_ADDITIONS_PARAMS="${CONTROLPANEL_ADDITIONS_PARAMS} -e COMMUNITY_SERVER_EXTERNAL=true";
|
||||
fi
|
||||
|
||||
sudo docker run -i -t -d --restart=always --name ${CONTROLPANEL_CONTAINER_NAME} ${CONTROLPANEL_ADDITIONS_PARAMS} \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /app/onlyoffice/CommunityServer/data:/app/onlyoffice/CommunityServer/data \
|
||||
-v /app/onlyoffice/DocumentServer/data:/app/onlyoffice/DocumentServer/data \
|
||||
@ -847,6 +898,14 @@ install_community_server () {
|
||||
|
||||
RUN_COMMAND="sudo docker run --name $COMMUNITY_CONTAINER_NAME -i -t -d --restart=always -p $COMMUNITY_PORT:80 -p 443:443 -p 5222:5222";
|
||||
|
||||
if [[ -n ${MAIL_SERVER_HOST} ]]; then
|
||||
RUN_COMMAND="$RUN_COMMAND -e MAIL_SERVER_DB_HOST='${MAIL_SERVER_HOST}'";
|
||||
fi
|
||||
|
||||
if [[ -n ${DOCUMENT_SERVER_HOST} ]]; then
|
||||
RUN_COMMAND="$RUN_COMMAND -e DOCUMENT_SERVER_HOST='${DOCUMENT_SERVER_HOST}'";
|
||||
fi
|
||||
|
||||
if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
|
||||
RUN_COMMAND="$RUN_COMMAND --link $DOCUMENT_CONTAINER_NAME:document_server";
|
||||
fi
|
||||
@ -922,7 +981,9 @@ start_installation () {
|
||||
|
||||
check_kernel
|
||||
|
||||
check_ports
|
||||
if [ "$UPDATE" != "true" ]; then
|
||||
check_ports
|
||||
fi
|
||||
|
||||
if ! command_exists docker ; then
|
||||
install_docker;
|
||||
|
199
web/Executables/restart.sh
Normal file
@ -0,0 +1,199 @@
|
||||
#/bin/bash
|
||||
|
||||
# (c) Copyright Ascensio System Limited 2010-2015
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
COMMUNITY_CONTAINER_NAME="onlyoffice-community-server";
|
||||
DOCUMENT_CONTAINER_NAME="onlyoffice-document-server";
|
||||
MAIL_CONTAINER_NAME="onlyoffice-mail-server";
|
||||
CONTROLPANEL_CONTAINER_NAME="onlyoffice-control-panel";
|
||||
FAST="false"
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
|
||||
-cc | --communitycontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
COMMUNITY_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-dc | --documentcontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
DOCUMENT_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-mc | --mailcontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
MAIL_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-cpc | --controlpanelcontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
CONTROLPANEL_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-f | --fast )
|
||||
if [ "$2" != "" ]; then
|
||||
FAST=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
echo " -cc, --communitycontainer community container name"
|
||||
echo " -dc, --documentcontainer document container name"
|
||||
echo " -mc, --mailcontainer mail container name"
|
||||
echo " -cpc, --controlpanelcontainer control panel container name"
|
||||
echo " -f, --fast fast restart services in community container"
|
||||
echo " -?, -h, --help this help"
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown parameter $1" 1>&2
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
|
||||
root_checking () {
|
||||
if [ ! $( id -u ) -eq 0 ]; then
|
||||
echo "To perform this action you must be logged in with root rights"
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
command_exists () {
|
||||
type "$1" &> /dev/null;
|
||||
}
|
||||
|
||||
install_sudo () {
|
||||
if command_exists apt-get; then
|
||||
apt-get install sudo
|
||||
elif command_exists yum; then
|
||||
yum install sudo
|
||||
fi
|
||||
|
||||
if ! command_exists sudo; then
|
||||
echo "command sudo not found"
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
fast_restart () {
|
||||
COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${COMMUNITY_SERVER_ID} ]]; then
|
||||
sudo docker exec ${COMMUNITY_CONTAINER_NAME} service monoserve restart;
|
||||
sudo docker exec ${COMMUNITY_CONTAINER_NAME} service monoserve2 restart;
|
||||
sudo docker exec ${COMMUNITY_CONTAINER_NAME} service nginx restart;
|
||||
else
|
||||
echo "COMMUNITY SERVER not found"
|
||||
fi
|
||||
}
|
||||
|
||||
restart_document_server () {
|
||||
DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
|
||||
if [[ -z "$1" ]]; then
|
||||
sudo docker restart ${DOCUMENT_SERVER_ID};
|
||||
else
|
||||
sudo docker $1 ${DOCUMENT_SERVER_ID};
|
||||
fi
|
||||
else
|
||||
echo "DOCUMENT SERVER not found"
|
||||
fi
|
||||
}
|
||||
|
||||
restart_mail_server () {
|
||||
MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${MAIL_SERVER_ID} ]]; then
|
||||
if [[ -z "$1" ]]; then
|
||||
sudo docker restart ${MAIL_SERVER_ID};
|
||||
else
|
||||
sudo docker $1 ${MAIL_SERVER_ID};
|
||||
fi
|
||||
else
|
||||
echo "MAIL SERVER not found"
|
||||
fi
|
||||
}
|
||||
|
||||
restart_controlpanel () {
|
||||
CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${CONTROL_PANEL_ID} ]]; then
|
||||
if [[ -z "$1" ]]; then
|
||||
sudo docker restart ${CONTROL_PANEL_ID};
|
||||
else
|
||||
sudo docker $1 ${CONTROL_PANEL_ID};
|
||||
fi
|
||||
else
|
||||
echo "CONTROL PANEL not found"
|
||||
fi
|
||||
}
|
||||
|
||||
restart_community_server () {
|
||||
COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${COMMUNITY_SERVER_ID} ]]; then
|
||||
if [[ -z "$1" ]]; then
|
||||
sudo docker restart ${COMMUNITY_SERVER_ID};
|
||||
else
|
||||
sudo docker $1 ${COMMUNITY_SERVER_ID};
|
||||
fi
|
||||
else
|
||||
echo "COMMUNITY SERVER not found"
|
||||
fi
|
||||
}
|
||||
|
||||
start_restart () {
|
||||
root_checking
|
||||
|
||||
if ! command_exists sudo ; then
|
||||
install_sudo;
|
||||
fi
|
||||
|
||||
if [ "$FAST" == "true" ]; then
|
||||
fast_restart
|
||||
else
|
||||
restart_document_server "stop"
|
||||
restart_mail_server "stop"
|
||||
restart_controlpanel "stop"
|
||||
restart_community_server "stop"
|
||||
|
||||
restart_document_server "start"
|
||||
restart_mail_server "start"
|
||||
restart_controlpanel "start"
|
||||
restart_community_server "start"
|
||||
fi
|
||||
|
||||
echo "restart complete"
|
||||
exit 0;
|
||||
}
|
||||
|
||||
|
||||
start_restart
|
@ -11,31 +11,169 @@
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
MAIL_SERVER_ID=$(sudo docker ps -a | grep 'onlyoffice-mail-server' | awk '{print $1}');
|
||||
DOCUMENT_SERVER_ID=$(sudo docker ps -a | grep 'onlyoffice-document-server' | awk '{print $1}');
|
||||
COMMUNITY_SERVER_ID=$(sudo docker ps -a | grep 'onlyoffice-community-server' | awk '{print $1}');
|
||||
UPDATE=0
|
||||
COMMUNITY_PORT=80
|
||||
COMMUNITY_IMAGE_NAME='onlyoffice/communityserver';
|
||||
COMMUNITY_CONTAINER_NAME='onlyoffice-community-server';
|
||||
DOCUMENT_CONTAINER_NAME='onlyoffice-document-server';
|
||||
MAIL_CONTAINER_NAME='onlyoffice-mail-server';
|
||||
CONTROLPANEL_CONTAINER_NAME='onlyoffice-control-panel';
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
|
||||
-u | --update )
|
||||
UPDATE=1
|
||||
;;
|
||||
|
||||
-i | --image )
|
||||
if [ "$2" != "" ]; then
|
||||
COMMUNITY_IMAGE_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-v | --version )
|
||||
if [ "$2" != "" ]; then
|
||||
VERSION=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-c | --container )
|
||||
if [ "$2" != "" ]; then
|
||||
COMMUNITY_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-dc | --documentcontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
DOCUMENT_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-mc | --mailcontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
MAIL_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-cc | --controlpanelcontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
CONTROLPANEL_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-p | --password )
|
||||
if [ "$2" != "" ]; then
|
||||
PASSWORD=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-un | --username )
|
||||
if [ "$2" != "" ]; then
|
||||
USERNAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
echo " -u, --update update"
|
||||
echo " -i, --image image name"
|
||||
echo " -v, --version image version"
|
||||
echo " -c, --container container name"
|
||||
echo " -dc, --documentcontainer document container name"
|
||||
echo " -mc, --mailcontainer mail container name"
|
||||
echo " -cc, --controlpanelcontainer controlpanel container name"
|
||||
echo " -p, --password dockerhub password"
|
||||
echo " -un, --username dockerhub username"
|
||||
echo " -?, -h, --help this help"
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown parameter $1" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
|
||||
COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
|
||||
DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
|
||||
MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
|
||||
CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${COMMUNITY_SERVER_ID} ]]; then
|
||||
echo "ONLYOFFICE COMMUNITY SERVER is already installed."
|
||||
if [ "$UPDATE" == "1" ]; then
|
||||
sudo bash /app/onlyoffice/setup/tools/check-bindings.sh ${COMMUNITY_SERVER_ID}
|
||||
|
||||
sudo docker start ${COMMUNITY_SERVER_ID};
|
||||
COMMUNITY_PORT=$(sudo docker port $COMMUNITY_SERVER_ID 80 | sed 's/.*://')
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
sudo bash /app/onlyoffice/setup/tools/remove-container.sh ${COMMUNITY_CONTAINER_NAME}
|
||||
else
|
||||
echo "ONLYOFFICE COMMUNITY SERVER is already installed."
|
||||
sudo docker start ${COMMUNITY_SERVER_ID};
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
fi
|
||||
fi
|
||||
|
||||
RUN_COMMAND="sudo docker run --restart=always --name onlyoffice-community-server -i -t -d -p 80:80 -p 443:443 -p 5222:5222";
|
||||
if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
|
||||
sudo bash /app/onlyoffice/setup/tools/login-docker.sh ${USERNAME} ${PASSWORD}
|
||||
fi
|
||||
|
||||
if [[ -z ${VERSION} ]]; then
|
||||
GET_VERSION_COMMAND="sudo bash /app/onlyoffice/setup/tools/get-available-version.sh -i $COMMUNITY_IMAGE_NAME";
|
||||
|
||||
if [[ -n ${PASSWORD} && -n ${USERNAME} ]]; then
|
||||
GET_VERSION_COMMAND="$GET_VERSION_COMMAND -un $USERNAME -p $PASSWORD";
|
||||
fi
|
||||
|
||||
VERSION=$(${GET_VERSION_COMMAND});
|
||||
fi
|
||||
|
||||
RUN_COMMAND="sudo docker run --net onlyoffice --name $COMMUNITY_CONTAINER_NAME -i -t -d --restart=always -p $COMMUNITY_PORT:80 -p 443:443 -p 5222:5222";
|
||||
RUN_COMMAND="$RUN_COMMAND -e ONLYOFFICE_MONOSERVE_COUNT=2";
|
||||
|
||||
if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
|
||||
RUN_COMMAND="$RUN_COMMAND --link onlyoffice-document-server:document_server";
|
||||
RUN_COMMAND="$RUN_COMMAND -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=$DOCUMENT_CONTAINER_NAME";
|
||||
fi
|
||||
|
||||
if [[ -n ${MAIL_SERVER_ID} ]]; then
|
||||
RUN_COMMAND="$RUN_COMMAND --link onlyoffice-mail-server:mail_server";
|
||||
fi
|
||||
RUN_COMMAND="$RUN_COMMAND -e MAIL_SERVER_DB_HOST=${MAIL_CONTAINER_NAME}";
|
||||
fi
|
||||
|
||||
RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data -v /app/onlyoffice/CommunityServer/mysql:/var/lib/mysql -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice onlyoffice/communityserver";
|
||||
if [[ -n ${CONTROL_PANEL_ID} ]]; then
|
||||
RUN_COMMAND="$RUN_COMMAND -e CONTROL_PANEL_PORT_80_TCP=80";
|
||||
RUN_COMMAND="$RUN_COMMAND -e CONTROL_PANEL_PORT_80_TCP_ADDR=$CONTROLPANEL_CONTAINER_NAME";
|
||||
fi
|
||||
|
||||
RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data";
|
||||
RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/CommunityServer/mysql:/var/lib/mysql";
|
||||
RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice";
|
||||
RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/DocumentServerData";
|
||||
RUN_COMMAND="$RUN_COMMAND $COMMUNITY_IMAGE_NAME:$VERSION";
|
||||
|
||||
${RUN_COMMAND};
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
|
||||
|
||||
if [[ -z ${COMMUNITY_SERVER_ID} ]]; then
|
||||
echo "ONLYOFFICE COMMUNITY SERVER not installed."
|
||||
echo "INSTALLATION-STOP-ERROR"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
echo "ONLYOFFICE COMMUNITY SERVER successfully installed."
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
133
web/Executables/run-control-panel.sh
Normal file
@ -0,0 +1,133 @@
|
||||
#/bin/bash
|
||||
|
||||
# (c) Copyright Ascensio System Limited 2010-2015
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
UPDATE=0
|
||||
CONTROLPANEL_IMAGE_NAME='onlyoffice/controlpanel';
|
||||
CONTROLPANEL_CONTAINER_NAME='onlyoffice-control-panel';
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
|
||||
-u | --update )
|
||||
UPDATE=1
|
||||
;;
|
||||
|
||||
-i | --image )
|
||||
if [ "$2" != "" ]; then
|
||||
CONTROLPANEL_IMAGE_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-v | --version )
|
||||
if [ "$2" != "" ]; then
|
||||
VERSION=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-c | --container )
|
||||
if [ "$2" != "" ]; then
|
||||
CONTROLPANEL_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-p | --password )
|
||||
if [ "$2" != "" ]; then
|
||||
PASSWORD=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-un | --username )
|
||||
if [ "$2" != "" ]; then
|
||||
USERNAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
echo " -u, --update update"
|
||||
echo " -i, --image image name"
|
||||
echo " -v, --version image version"
|
||||
echo " -c, --container container name"
|
||||
echo " -p, --password dockerhub password"
|
||||
echo " -un, --username dockerhub username"
|
||||
echo " -?, -h, --help this help"
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown parameter $1" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
|
||||
CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${CONTROL_PANEL_ID} ]]; then
|
||||
if [ "$UPDATE" == "1" ]; then
|
||||
sudo bash /app/onlyoffice/setup/tools/check-bindings.sh ${CONTROL_PANEL_ID}
|
||||
sudo bash /app/onlyoffice/setup/tools/remove-container.sh ${CONTROLPANEL_CONTAINER_NAME}
|
||||
else
|
||||
echo "ONLYOFFICE CONTROL PANEL is already installed."
|
||||
sudo docker start ${CONTROL_PANEL_ID};
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
|
||||
sudo bash /app/onlyoffice/setup/tools/login-docker.sh ${USERNAME} ${PASSWORD}
|
||||
fi
|
||||
|
||||
if [[ -z ${VERSION} ]]; then
|
||||
GET_VERSION_COMMAND="sudo bash /app/onlyoffice/setup/tools/get-available-version.sh -i $CONTROLPANEL_IMAGE_NAME";
|
||||
|
||||
if [[ -n ${PASSWORD} && -n ${USERNAME} ]]; then
|
||||
GET_VERSION_COMMAND="$GET_VERSION_COMMAND -un $USERNAME -p $PASSWORD";
|
||||
fi
|
||||
|
||||
VERSION=$(${GET_VERSION_COMMAND});
|
||||
fi
|
||||
|
||||
sudo bash /app/onlyoffice/setup/tools/pull-image.sh ${CONTROLPANEL_IMAGE_NAME} ${VERSION}
|
||||
|
||||
sudo docker run --net onlyoffice -i -t -d --restart=always --name ${CONTROLPANEL_CONTAINER_NAME} \
|
||||
-v /var/run/docker.sock:/var/run/docker.sock \
|
||||
-v /app/onlyoffice/CommunityServer/data:/app/onlyoffice/CommunityServer/data \
|
||||
-v /app/onlyoffice/DocumentServer/data:/app/onlyoffice/DocumentServer/data \
|
||||
-v /app/onlyoffice/MailServer/data:/app/onlyoffice/MailServer/data \
|
||||
-v /app/onlyoffice/ControlPanel/data:/var/www/onlyoffice-controlpanel/Data \
|
||||
-v /app/onlyoffice/ControlPanel/logs:/var/log/onlyoffice-controlpanel \
|
||||
-v /app/onlyoffice/ControlPanel/mysql:/var/lib/mysql \
|
||||
${CONTROLPANEL_IMAGE_NAME}:${VERSION}
|
||||
|
||||
CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
|
||||
|
||||
if [[ -z ${CONTROL_PANEL_ID} ]]; then
|
||||
echo "ONLYOFFICE CONTROL PANEL not installed."
|
||||
echo "INSTALLATION-STOP-ERROR"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
echo "ONLYOFFICE CONTROL PANEL successfully installed."
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
@ -11,20 +11,118 @@
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
DOCUMENT_SERVER_ID=$(sudo docker ps -a | grep 'onlyoffice-document-server' | awk '{print $1}');
|
||||
UPDATE=0
|
||||
DOCUMENT_IMAGE_NAME='onlyoffice/documentserver';
|
||||
DOCUMENT_CONTAINER_NAME='onlyoffice-document-server';
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
|
||||
-u | --update )
|
||||
UPDATE=1
|
||||
;;
|
||||
|
||||
-i | --image )
|
||||
if [ "$2" != "" ]; then
|
||||
DOCUMENT_IMAGE_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-v | --version )
|
||||
if [ "$2" != "" ]; then
|
||||
VERSION=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-c | --container )
|
||||
if [ "$2" != "" ]; then
|
||||
DOCUMENT_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-p | --password )
|
||||
if [ "$2" != "" ]; then
|
||||
PASSWORD=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-un | --username )
|
||||
if [ "$2" != "" ]; then
|
||||
USERNAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
echo " -u, --update update"
|
||||
echo " -i, --image image name"
|
||||
echo " -v, --version image version"
|
||||
echo " -c, --container container name"
|
||||
echo " -p, --password dockerhub password"
|
||||
echo " -un, --username dockerhub username"
|
||||
echo " -?, -h, --help this help"
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown parameter $1" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
|
||||
DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
|
||||
echo "ONLYOFFICE DOCUMENT SERVER is already installed."
|
||||
|
||||
sudo docker start ${DOCUMENT_SERVER_ID};
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
if [ "$UPDATE" == "1" ]; then
|
||||
sudo bash /app/onlyoffice/setup/tools/check-bindings.sh ${DOCUMENT_SERVER_ID} "/etc/onlyoffice,/var/lib/onlyoffice"
|
||||
sudo bash /app/onlyoffice/setup/tools/remove-container.sh ${DOCUMENT_CONTAINER_NAME}
|
||||
else
|
||||
echo "ONLYOFFICE DOCUMENT SERVER is already installed."
|
||||
sudo docker start ${DOCUMENT_SERVER_ID};
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
fi
|
||||
fi
|
||||
|
||||
sudo docker run --restart=always -i -t -d --name onlyoffice-document-server \
|
||||
if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
|
||||
sudo bash /app/onlyoffice/setup/tools/login-docker.sh ${USERNAME} ${PASSWORD}
|
||||
fi
|
||||
|
||||
if [[ -z ${VERSION} ]]; then
|
||||
GET_VERSION_COMMAND="sudo bash /app/onlyoffice/setup/tools/get-available-version.sh -i $DOCUMENT_IMAGE_NAME";
|
||||
|
||||
if [[ -n ${PASSWORD} && -n ${USERNAME} ]]; then
|
||||
GET_VERSION_COMMAND="$GET_VERSION_COMMAND -un $USERNAME -p $PASSWORD";
|
||||
fi
|
||||
|
||||
VERSION=$(${GET_VERSION_COMMAND});
|
||||
fi
|
||||
|
||||
sudo bash /app/onlyoffice/setup/tools/pull-image.sh ${DOCUMENT_IMAGE_NAME} ${VERSION}
|
||||
|
||||
sudo docker run --net onlyoffice -i -t -d --restart=always --name ${DOCUMENT_CONTAINER_NAME} \
|
||||
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
|
||||
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
|
||||
onlyoffice/documentserver
|
||||
${DOCUMENT_IMAGE_NAME}:${VERSION}
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
|
||||
|
||||
if [[ -z ${DOCUMENT_SERVER_ID} ]]; then
|
||||
echo "ONLYOFFICE DOCUMENT SERVER not installed."
|
||||
echo "INSTALLATION-STOP-ERROR"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
echo "ONLYOFFICE DOCUMENT SERVER successfully installed."
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
@ -11,30 +11,139 @@
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
MAIL_SERVER_ID=$(sudo docker ps -a | grep 'onlyoffice-mail-server' | awk '{print $1}');
|
||||
UPDATE=0
|
||||
MAIL_IMAGE_NAME='onlyoffice/mailserver';
|
||||
MAIL_CONTAINER_NAME='onlyoffice-mail-server';
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
|
||||
-u | --update )
|
||||
UPDATE=1
|
||||
;;
|
||||
|
||||
-i | --image )
|
||||
if [ "$2" != "" ]; then
|
||||
MAIL_IMAGE_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-v | --version )
|
||||
if [ "$2" != "" ]; then
|
||||
VERSION=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-c | --container )
|
||||
if [ "$2" != "" ]; then
|
||||
MAIL_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-d | --domain )
|
||||
if [ "$2" != "" ]; then
|
||||
MAIL_DOMAIN_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-p | --password )
|
||||
if [ "$2" != "" ]; then
|
||||
PASSWORD=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-un | --username )
|
||||
if [ "$2" != "" ]; then
|
||||
USERNAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
echo " -u, --update update"
|
||||
echo " -i, --image image name"
|
||||
echo " -v, --version image version"
|
||||
echo " -c, --container container name"
|
||||
echo " -d, --domain domain name"
|
||||
echo " -p, --password dockerhub password"
|
||||
echo " -un, --username dockerhub username"
|
||||
echo " -?, -h, --help this help"
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown parameter $1" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
|
||||
MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${MAIL_SERVER_ID} ]]; then
|
||||
echo "ONLYOFFICE MAIL SERVER is already installed."
|
||||
if [ "$UPDATE" == "1" ]; then
|
||||
sudo bash /app/onlyoffice/setup/tools/check-bindings.sh ${MAIL_SERVER_ID}
|
||||
|
||||
sudo docker start ${MAIL_SERVER_ID};
|
||||
if [[ -z ${MAIL_DOMAIN_NAME} ]]; then
|
||||
MAIL_DOMAIN_NAME=$(sudo docker exec $MAIL_SERVER_ID hostname -f);
|
||||
fi
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
sudo bash /app/onlyoffice/setup/tools/remove-container.sh ${MAIL_CONTAINER_NAME}
|
||||
else
|
||||
echo "ONLYOFFICE MAIL SERVER is already installed."
|
||||
sudo docker start ${MAIL_SERVER_ID};
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
exit 0;
|
||||
fi
|
||||
fi
|
||||
|
||||
MAIL_SERVER_HOSTNAME=${1};
|
||||
if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
|
||||
sudo bash /app/onlyoffice/setup/tools/login-docker.sh ${USERNAME} ${PASSWORD}
|
||||
fi
|
||||
|
||||
if [[ -z ${MAIL_SERVER_HOSTNAME} ]]; then
|
||||
echo "Please, set hostname for mail server"
|
||||
if [[ -z ${VERSION} ]]; then
|
||||
GET_VERSION_COMMAND="sudo bash /app/onlyoffice/setup/tools/get-available-version.sh -i $MAIL_IMAGE_NAME";
|
||||
|
||||
if [[ -n ${PASSWORD} && -n ${USERNAME} ]]; then
|
||||
GET_VERSION_COMMAND="$GET_VERSION_COMMAND -un $USERNAME -p $PASSWORD";
|
||||
fi
|
||||
|
||||
VERSION=$(${GET_VERSION_COMMAND});
|
||||
fi
|
||||
|
||||
if [[ -z ${MAIL_DOMAIN_NAME} ]]; then
|
||||
echo "Please, set domain name for mail server"
|
||||
echo "INSTALLATION-STOP-ERROR[4]"
|
||||
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
sudo docker run --restart=always --privileged -i -t -d --name onlyoffice-mail-server -p 25:25 -p 143:143 -p 587:587 \
|
||||
sudo bash /app/onlyoffice/setup/tools/pull-image.sh ${MAIL_IMAGE_NAME} ${VERSION}
|
||||
|
||||
sudo docker run --net onlyoffice --privileged -i -t -d --restart=always --name ${MAIL_CONTAINER_NAME} -p 25:25 -p 143:143 -p 587:587 \
|
||||
-v /app/onlyoffice/MailServer/data:/var/vmail \
|
||||
-v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
|
||||
-v /app/onlyoffice/MailServer/logs:/var/log -v \
|
||||
/app/onlyoffice/MailServer/mysql:/var/lib/mysql -h ${MAIL_SERVER_HOSTNAME} onlyoffice/mailserver
|
||||
-v /app/onlyoffice/MailServer/logs:/var/log \
|
||||
-v /app/onlyoffice/MailServer/mysql:/var/lib/mysql \
|
||||
-h ${MAIL_DOMAIN_NAME} ${MAIL_IMAGE_NAME}:${VERSION}
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
|
||||
|
||||
if [[ -z ${MAIL_SERVER_ID} ]]; then
|
||||
echo "ONLYOFFICE MAIL SERVER not installed."
|
||||
echo "INSTALLATION-STOP-ERROR"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
echo "ONLYOFFICE MAIL SERVER successfully installed."
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
52
web/Executables/tools/check-bindings.sh
Normal file
@ -0,0 +1,52 @@
|
||||
#!/bin/bash
|
||||
|
||||
# (c) Copyright Ascensio System Limited 2010-2015
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
if [[ -z "$1" ]]; then
|
||||
echo "container id is empty";
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
binds=$(sudo docker inspect --format='{{range $p,$conf:=.HostConfig.Binds}}{{$conf}};{{end}}' $1)
|
||||
volumes=$(sudo docker inspect --format='{{range $p,$conf:=.Config.Volumes}}{{$p}};{{end}}' $1)
|
||||
arrBinds=$(echo $binds | tr ";" "\n")
|
||||
arrVolumes=$(echo $volumes | tr ";" "\n")
|
||||
bindsCorrect=1
|
||||
|
||||
if [[ -n "$2" ]]; then
|
||||
exceptions=$(echo $2 | tr "," "\n")
|
||||
for ex in ${exceptions[@]}
|
||||
do
|
||||
arrVolumes=(${arrVolumes[@]/$ex})
|
||||
done
|
||||
fi
|
||||
|
||||
for volume in $arrVolumes
|
||||
do
|
||||
bindExist=0
|
||||
for bind in $arrBinds
|
||||
do
|
||||
bind=($(echo $bind | tr ":" " "))
|
||||
if [ "${bind[1]}" == "${volume}" ]; then
|
||||
bindExist=1
|
||||
fi
|
||||
done
|
||||
if [ "$bindExist" = "0" ]; then
|
||||
bindsCorrect=0
|
||||
echo "${volume} not binded"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$bindsCorrect" = "0" ]; then
|
||||
echo "INSTALLATION-STOP-ERROR";
|
||||
exit 0;
|
||||
fi
|
@ -11,31 +11,19 @@
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
CHECK_25=${1:-false}
|
||||
STR_PORTS=${1}
|
||||
ARRAY_PORTS=(${STR_PORTS//,/ })
|
||||
|
||||
if [ "`sudo netstat -lnp | grep ':80'`" != "" ]; then
|
||||
echo "The following ports must be open: 80"
|
||||
echo "INSTALLATION-STOP-ERROR[3]"
|
||||
exit 0;
|
||||
fi
|
||||
for PORT in "${ARRAY_PORTS[@]}"
|
||||
do
|
||||
REGEXP=":$PORT$"
|
||||
CHECK_RESULT=$(sudo netstat -lnp | awk '{print $4}' | grep $REGEXP)
|
||||
|
||||
|
||||
if [ "`sudo netstat -lnp | grep ':443'`" != "" ]; then
|
||||
echo "The following ports must be open: 443"
|
||||
echo "INSTALLATION-STOP-ERROR[3]"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
|
||||
if [ "${CHECK_25}" == "true" ] ; then
|
||||
|
||||
if [ "`sudo netstat -lnp | grep ':25'`" != "" ]; then
|
||||
echo "The following ports must be open: 25"
|
||||
if [[ $CHECK_RESULT != "" ]]; then
|
||||
echo "The following ports must be open: $PORT"
|
||||
echo "INSTALLATION-STOP-ERROR[3]"
|
||||
exit 0;
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
||||
|
@ -11,16 +11,80 @@
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
MAIL_SERVER_ID="";
|
||||
DOCUMENT_SERVER_ID="";
|
||||
COMMUNITY_SERVER_ID="";
|
||||
COMMUNITY_SERVER_VERSION='';
|
||||
DOCUMENT_SERVER_VERSION='';
|
||||
MAIL_SERVER_VERSION='';
|
||||
CONTROL_PANEL_VERSION='';
|
||||
LICENSE_FILE_EXIST="false";
|
||||
|
||||
COMMUNITY_CONTAINER_NAME='onlyoffice-community-server';
|
||||
DOCUMENT_CONTAINER_NAME='onlyoffice-document-server';
|
||||
MAIL_CONTAINER_NAME='onlyoffice-mail-server';
|
||||
CONTROLPANEL_CONTAINER_NAME='onlyoffice-control-panel';
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
|
||||
-cc | --communitycontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
COMMUNITY_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-dc | --documentcontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
DOCUMENT_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-mc | --mailcontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
MAIL_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-cpc | --controlpanelcontainer )
|
||||
if [ "$2" != "" ]; then
|
||||
CONTROLPANEL_CONTAINER_NAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
echo " -cc, --communitycontainer community container name"
|
||||
echo " -dc, --documentcontainer document container name"
|
||||
echo " -mc, --mailcontainer mail container name"
|
||||
echo " -cpc, --controlpanelcontainer controlpanel container name"
|
||||
echo " -?, -h, --help this help"
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown parameter $1" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
root_checking () {
|
||||
if [ ! $( id -u ) -eq 0 ]; then
|
||||
echo "To perform this action you must be logged in with root rights"
|
||||
echo "INSTALLATION-STOP-ERROR[8]"
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
command_exists () {
|
||||
type "$1" &> /dev/null ;
|
||||
}
|
||||
|
||||
|
||||
install_sudo () {
|
||||
if command_exists apt-get ; then
|
||||
apt-get install sudo
|
||||
@ -37,6 +101,28 @@ install_sudo () {
|
||||
fi
|
||||
}
|
||||
|
||||
check_license_file_in_dir () {
|
||||
if [ "LICENSE_FILE_EXIST" != "true" ]; then
|
||||
if [ -d "$1" ]; then
|
||||
for file in "$1"/*.lic
|
||||
do
|
||||
if [ -f "${file}" ]; then
|
||||
LICENSE_FILE_EXIST="true";
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
check_license_file () {
|
||||
check_license_file_in_dir "/app/onlyoffice/DocumentServer/data"
|
||||
check_license_file_in_dir "/app/onlyoffice/DocumentServer/data"
|
||||
check_license_file_in_dir "/app/onlyoffice/MailServer/data"
|
||||
check_license_file_in_dir "/app/onlyoffice/ControlPanel/data"
|
||||
}
|
||||
|
||||
root_checking
|
||||
|
||||
if ! command_exists sudo ; then
|
||||
install_sudo;
|
||||
@ -44,15 +130,19 @@ fi
|
||||
|
||||
|
||||
if command_exists docker ; then
|
||||
MAIL_SERVER_ID=$(sudo docker ps -a | grep 'onlyoffice-mail-server' | awk '{print $1}');
|
||||
DOCUMENT_SERVER_ID=$(sudo docker ps -a | grep 'onlyoffice-document-server' | awk '{print $1}');
|
||||
COMMUNITY_SERVER_ID=$(sudo docker ps -a | grep 'onlyoffice-community-server' | awk '{print $1}');
|
||||
MAIL_SERVER_VERSION=$(sudo docker ps -a | grep ${MAIL_CONTAINER_NAME} | awk '{print $2}' | sed 's/.*://');
|
||||
DOCUMENT_SERVER_VERSION=$(sudo docker ps -a | grep ${DOCUMENT_CONTAINER_NAME} | awk '{print $2}' | sed 's/.*://');
|
||||
COMMUNITY_SERVER_VERSION=$(sudo docker ps -a | grep ${COMMUNITY_CONTAINER_NAME} | awk '{print $2}' | sed 's/.*://');
|
||||
CONTROL_PANEL_VERSION=$(sudo docker ps -a | grep ${CONTROLPANEL_CONTAINER_NAME} | awk '{print $2}' | sed 's/.*://');
|
||||
fi
|
||||
|
||||
check_license_file
|
||||
|
||||
echo "MAIL_SERVER_ID: [$MAIL_SERVER_ID]"
|
||||
echo "DOCUMENT_SERVER_ID: [$DOCUMENT_SERVER_ID]"
|
||||
echo "COMMUNITY_SERVER_ID: [$COMMUNITY_SERVER_ID]"
|
||||
echo "MAIL_SERVER_VERSION: [$MAIL_SERVER_VERSION]"
|
||||
echo "DOCUMENT_SERVER_VERSION: [$DOCUMENT_SERVER_VERSION]"
|
||||
echo "COMMUNITY_SERVER_VERSION: [$COMMUNITY_SERVER_VERSION]"
|
||||
echo "CONTROL_PANEL_VERSION: [$CONTROL_PANEL_VERSION]"
|
||||
echo "LICENSE_FILE_EXIST: [$LICENSE_FILE_EXIST]"
|
||||
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
112
web/Executables/tools/get-available-version.sh
Normal file
@ -0,0 +1,112 @@
|
||||
#!/bin/bash
|
||||
|
||||
# (c) Copyright Ascensio System Limited 2010-2015
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
-i | --image )
|
||||
IMAGE=$2
|
||||
shift
|
||||
;;
|
||||
|
||||
-un | --username )
|
||||
USERNAME=$2
|
||||
shift
|
||||
;;
|
||||
|
||||
-p | --password )
|
||||
PASSWORD=$2
|
||||
shift
|
||||
;;
|
||||
|
||||
-? | -h | --help )
|
||||
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
|
||||
echo " Parameters:"
|
||||
echo " -i, --image image"
|
||||
echo " -un, --username dockerhub username"
|
||||
echo " -p, --password dockerhub password"
|
||||
echo " -?, -h, --help this help"
|
||||
echo
|
||||
exit 0
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "Unknown parameter $1" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
|
||||
|
||||
command_exists () {
|
||||
type "$1" &> /dev/null;
|
||||
}
|
||||
|
||||
install_curl () {
|
||||
if command_exists apt-get; then
|
||||
sudo apt-get -y -q install curl
|
||||
elif command_exists yum; then
|
||||
sudo yum -y install curl
|
||||
fi
|
||||
|
||||
if ! command_exists curl; then
|
||||
echo "command curl not found"
|
||||
exit 0;
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
|
||||
if [ "$IMAGE" == "" ]; then
|
||||
echo "image name is empty"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! command_exists curl ; then
|
||||
install_curl;
|
||||
fi
|
||||
|
||||
CREDENTIALS="";
|
||||
AUTH_HEADER="";
|
||||
|
||||
if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
|
||||
CREDENTIALS="{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\"}";
|
||||
fi
|
||||
|
||||
if [[ -n ${CREDENTIALS} ]]; then
|
||||
LOGIN_RESP=$(curl -s -H "Content-Type: application/json" -X POST -d "$CREDENTIALS" https://hub.docker.com/v2/users/login/)
|
||||
TOKEN=$(echo $LOGIN_RESP | sed 's/"token"//g' | tr -d '{}:" ')
|
||||
AUTH_HEADER="Authorization: JWT $TOKEN"
|
||||
fi
|
||||
|
||||
TAGS_RESP=$(curl -s -H "$AUTH_HEADER" -X GET https://hub.docker.com/v2/repositories/${IMAGE}/tags/);
|
||||
TAGS_RESP=$(echo $TAGS_RESP | tr -d '[]{},:"')
|
||||
|
||||
VERSION_REGEX_1="[0-9]+\.[0-9]+\.[0-9]+"
|
||||
VERSION_REGEX_2="[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"
|
||||
TAG_LIST=""
|
||||
|
||||
for item in $TAGS_RESP
|
||||
do
|
||||
if [[ $item =~ $VERSION_REGEX_1 ]] || [[ $item =~ $VERSION_REGEX_2 ]]; then
|
||||
TAG_LIST="$item,$TAG_LIST"
|
||||
fi
|
||||
done
|
||||
|
||||
LATEST_TAG=$(echo $TAG_LIST | tr ',' '\n' | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | awk '/./{line=$0} END{print line}');
|
||||
|
||||
echo "$LATEST_TAG"
|
||||
|
@ -11,84 +11,72 @@
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
lowercase(){
|
||||
to_lowercase () {
|
||||
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
|
||||
}
|
||||
|
||||
shootProfile(){
|
||||
OS=`lowercase \`uname\``
|
||||
KERNEL=`uname -r`
|
||||
MACH=`uname -m`
|
||||
get_os_info () {
|
||||
OS=`to_lowercase \`uname\``
|
||||
|
||||
if [ "${OS}" == "windowsnt" ]; then
|
||||
OS=windows
|
||||
echo "Not supported OS";
|
||||
exit 0;
|
||||
elif [ "${OS}" == "darwin" ]; then
|
||||
OS=mac
|
||||
echo "Not supported OS";
|
||||
exit 0;
|
||||
else
|
||||
OS=`uname`
|
||||
|
||||
if [ "${OS}" = "SunOS" ] ; then
|
||||
OS=Solaris
|
||||
ARCH=`uname -p`
|
||||
OSSTR="${OS} ${REV}(${ARCH} `uname -v`)"
|
||||
echo "Not supported OS";
|
||||
exit 0;
|
||||
elif [ "${OS}" = "AIX" ] ; then
|
||||
OSSTR="${OS} `oslevel` (`oslevel -r`)"
|
||||
echo "Not supported OS";
|
||||
exit 0;
|
||||
elif [ "${OS}" = "Linux" ] ; then
|
||||
|
||||
MACH=`uname -m`
|
||||
|
||||
if [ "${MACH}" != "x86_64" ]; then
|
||||
echo "Currently only supports 64bit OS's";
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
KERNEL=`uname -r`
|
||||
|
||||
if [ -f /etc/redhat-release ] ; then
|
||||
DistroBasedOn='RedHat'
|
||||
DIST=`cat /etc/redhat-release |sed s/\ release.*//`
|
||||
PSUEDONAME=`cat /etc/redhat-release | sed s/.*\(// | sed s/\)//`
|
||||
REV=`cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//`
|
||||
elif [ -f /etc/SuSE-release ] ; then
|
||||
DistroBasedOn='SuSe'
|
||||
PSUEDONAME=`cat /etc/SuSE-release | tr "\n" ' '| sed s/VERSION.*//`
|
||||
REV=`cat /etc/SuSE-release | tr "\n" ' ' | sed s/.*=\ //`
|
||||
elif [ -f /etc/mandrake-release ] ; then
|
||||
DistroBasedOn='Mandrake'
|
||||
PSUEDONAME=`cat /etc/mandrake-release | sed s/.*\(// | sed s/\)//`
|
||||
REV=`cat /etc/mandrake-release | sed s/.*release\ // | sed s/\ .*//`
|
||||
REV=`cat /etc/os-release | grep '^VERSION_ID' | awk -F= '{ print $2 }' | sed -e 's/^"//' -e 's/"$//'`
|
||||
DIST='SuSe'
|
||||
elif [ -f /etc/debian_version ] ; then
|
||||
DistroBasedOn='Debian'
|
||||
REV=`cat /etc/debian_version`
|
||||
DIST=$DistroBasedOn
|
||||
|
||||
DIST='Debian'
|
||||
if [ -f /etc/lsb-release ] ; then
|
||||
DIST=`cat /etc/lsb-release | grep '^DISTRIB_ID' | awk -F= '{ print $2 }'`
|
||||
PSUEDONAME=`cat /etc/lsb-release | grep '^DISTRIB_CODENAME' | awk -F= '{ print $2 }'`
|
||||
REV=`cat /etc/lsb-release | grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }'`
|
||||
elif [[ -f /etc/lsb_release ]]; then
|
||||
DIST=`lsb_release -a 2>&1 | grep 'Distributor ID:' | awk -F ":" '{print $2 }'`
|
||||
PSUEDONAME=`lsb_release -a 2>&1 | grep 'Codename:' | awk -F ":" '{print $2 }'`
|
||||
REV=`lsb_release -a 2>&1 | grep 'Release:' | awk -F ":" '{print $2 }'`
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -f /etc/UnitedLinux-release ] ; then
|
||||
DIST="${DIST}[`cat /etc/UnitedLinux-release | tr "\n" ' ' | sed s/VERSION.*//`]"
|
||||
fi
|
||||
|
||||
OS=`lowercase $OS`
|
||||
DistroBasedOn=`lowercase $DistroBasedOn`
|
||||
readonly OS
|
||||
readonly DIST
|
||||
readonly DistroBasedOn
|
||||
readonly PSUEDONAME
|
||||
readonly REV
|
||||
readonly KERNEL
|
||||
readonly MACH
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
shootProfile
|
||||
|
||||
echo "OS: [$OS]"
|
||||
|
||||
get_os_info
|
||||
|
||||
echo "DIST: [$DIST]"
|
||||
echo "REV: [$REV]"
|
||||
echo "MACH: [$MACH]"
|
||||
echo "PSUEDONAME: [$PSUEDONAME]"
|
||||
echo "DistroBasedOn: [$DistroBasedOn]"
|
||||
echo "KERNEL: [$KERNEL]"
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
19
web/Executables/tools/login-docker.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# (c) Copyright Ascensio System Limited 2010-2015
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
USERNAME=$1;
|
||||
PASSWORD=$2;
|
||||
|
||||
if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
|
||||
sudo docker login -u ${USERNAME} -p ${PASSWORD}
|
||||
fi
|
@ -11,24 +11,26 @@
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
SERVER_DIR=${1};
|
||||
sudo mkdir -p "/app/onlyoffice/setup";
|
||||
|
||||
sudo mkdir -p "${SERVER_DIR}/setup";
|
||||
sudo mkdir -p "/app/onlyoffice/DocumentServer/data";
|
||||
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/FileConverterService";
|
||||
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/CoAuthoringService";
|
||||
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/DocService";
|
||||
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/SpellCheckerService";
|
||||
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/LibreOfficeService";
|
||||
|
||||
sudo mkdir -p "${SERVER_DIR}/DocumentServer/data";
|
||||
sudo mkdir -p "${SERVER_DIR}/DocumentServer/logs/documentserver/FileConverterService";
|
||||
sudo mkdir -p "${SERVER_DIR}/DocumentServer/logs/documentserver/CoAuthoringService";
|
||||
sudo mkdir -p "${SERVER_DIR}/DocumentServer/logs/documentserver/DocService";
|
||||
sudo mkdir -p "${SERVER_DIR}/DocumentServer/logs/documentserver/SpellCheckerService";
|
||||
sudo mkdir -p "${SERVER_DIR}/DocumentServer/logs/documentserver/LibreOfficeService";
|
||||
sudo mkdir -p "/app/onlyoffice/MailServer/data/certs";
|
||||
sudo mkdir -p "/app/onlyoffice/MailServer/logs";
|
||||
sudo mkdir -p "/app/onlyoffice/MailServer/mysql";
|
||||
|
||||
sudo mkdir -p "${SERVER_DIR}/MailServer/data/certs";
|
||||
sudo mkdir -p "${SERVER_DIR}/MailServer/logs";
|
||||
sudo mkdir -p "${SERVER_DIR}/MailServer/mysql";
|
||||
sudo mkdir -p "/app/onlyoffice/CommunityServer/data";
|
||||
sudo mkdir -p "/app/onlyoffice/CommunityServer/logs";
|
||||
sudo mkdir -p "/app/onlyoffice/CommunityServer/mysql";
|
||||
|
||||
sudo mkdir -p "${SERVER_DIR}/CommunityServer/data";
|
||||
sudo mkdir -p "${SERVER_DIR}/CommunityServer/logs";
|
||||
sudo mkdir -p "${SERVER_DIR}/CommunityServer/mysql";
|
||||
sudo mkdir -p "/app/onlyoffice/ControlPanel/data";
|
||||
sudo mkdir -p "/app/onlyoffice/ControlPanel/logs";
|
||||
sudo mkdir -p "/app/onlyoffice/ControlPanel/mysql";
|
||||
|
||||
sudo chmod 777 /app -R
|
||||
|
||||
|
20
web/Executables/tools/make-network.sh
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
# (c) Copyright Ascensio System Limited 2010-2015
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
EXIST=$(sudo docker network ls | awk '{print $2;}' | grep -x onlyoffice);
|
||||
|
||||
if [[ -z $EXIST ]]; then
|
||||
sudo docker network create --driver bridge onlyoffice
|
||||
fi
|
||||
|
||||
echo "INSTALLATION-STOP-SUCCESS"
|
36
web/Executables/tools/pull-image.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
|
||||
# (c) Copyright Ascensio System Limited 2010-2015
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
IMAGE_NAME=$1;
|
||||
IMAGE_VERSION=$2;
|
||||
|
||||
if [[ -z ${IMAGE_NAME} || -z ${IMAGE_VERSION} ]]; then
|
||||
echo "Docker pull argument exception: repository=$IMAGE_NAME, tag=$IMAGE_VERSION"
|
||||
echo "INSTALLATION-STOP-ERROR";
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
EXIST=$(sudo docker images | grep "$IMAGE_NAME" | awk '{print $2;}' | grep -x "$IMAGE_VERSION");
|
||||
COUNT=1;
|
||||
|
||||
while [[ -z $EXIST && $COUNT -le 3 ]]; do
|
||||
sudo docker pull ${IMAGE_NAME}:${IMAGE_VERSION}
|
||||
EXIST=$(sudo docker images | grep "$IMAGE_NAME" | awk '{print $2;}' | grep -x "$IMAGE_VERSION");
|
||||
(( COUNT++ ))
|
||||
done
|
||||
|
||||
if [[ -z $EXIST ]]; then
|
||||
echo "Docker image $IMAGE_NAME:$IMAGE_VERSION not found"
|
||||
echo "INSTALLATION-STOP-ERROR";
|
||||
exit 0;
|
||||
fi
|
39
web/Executables/tools/remove-container.sh
Normal file
@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
# (c) Copyright Ascensio System Limited 2010-2015
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
|
||||
remove_container () {
|
||||
CONTAINER_NAME=$1;
|
||||
|
||||
if [[ -z ${CONTAINER_NAME} ]]; then
|
||||
echo "Empty container name"
|
||||
echo "INSTALLATION-STOP-ERROR";
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
echo "stop container:"
|
||||
sudo docker stop ${CONTAINER_NAME};
|
||||
echo "remove container:"
|
||||
sudo docker rm -f ${CONTAINER_NAME};
|
||||
|
||||
sleep 10 #Hack for SuSe: exception "Error response from daemon: devmapper: Unknown device xxx"
|
||||
|
||||
echo "check removed container:"
|
||||
CONTAINER_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTAINER_NAME});
|
||||
|
||||
if [[ -n ${CONTAINER_ID} ]]; then
|
||||
echo "try again remove ${CONTAINER_NAME}"
|
||||
remove_container ${CONTAINER_NAME}
|
||||
fi
|
||||
}
|
||||
|
||||
remove_container $1
|
@ -19,6 +19,7 @@
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Reflection;
|
||||
using System.Threading;
|
||||
using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
@ -45,8 +46,8 @@ namespace OneClickInstallation
|
||||
{
|
||||
if (!Settings.ResourcesFromDataBase) return;
|
||||
|
||||
AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
|
||||
AppDomain.CurrentDomain.AssemblyLoad += (s, a) => AssemblyWork.UploadResourceData(AppDomain.CurrentDomain.GetAssemblies());
|
||||
DBResourceManager.PatchAssemblies();
|
||||
DBResourceManager.PatchAssembly(Assembly.GetExecutingAssembly(), false);
|
||||
}
|
||||
|
||||
protected void Application_BeginRequest(object sender, EventArgs e)
|
||||
|
@ -18,8 +18,11 @@
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Web;
|
||||
using System.Web.Caching;
|
||||
using OneClickInstallation.Classes;
|
||||
using OneClickInstallation.Models;
|
||||
|
||||
namespace OneClickInstallation.Helpers
|
||||
@ -94,12 +97,29 @@ namespace OneClickInstallation.Helpers
|
||||
}
|
||||
|
||||
|
||||
public static void ClearCache(string userId)
|
||||
public static OsInfo GetOsInfo(string userId)
|
||||
{
|
||||
SetConnectionSettings(userId, null);
|
||||
SetInstalledComponents(userId, null);
|
||||
SetInstalledComponents(userId, null);
|
||||
SetInstalledComponents(userId, null);
|
||||
var key = "osInfo" + userId;
|
||||
return CacheGet<OsInfo>(key);
|
||||
}
|
||||
|
||||
public static void SetOsInfo(string userId, OsInfo value)
|
||||
{
|
||||
var key = "osInfo" + userId;
|
||||
CacheSet(key, value, TimeSpan.FromDays(1));
|
||||
}
|
||||
|
||||
|
||||
public static RequestInfoModel GetRequestInfo(string userId)
|
||||
{
|
||||
var key = "requestInfo" + userId;
|
||||
return CacheGet<RequestInfoModel>(key);
|
||||
}
|
||||
|
||||
public static void SetRequestInfo(string userId, RequestInfoModel value)
|
||||
{
|
||||
var key = "requestInfo" + userId;
|
||||
CacheSet(key, value, TimeSpan.FromDays(1));
|
||||
}
|
||||
|
||||
|
||||
@ -120,6 +140,40 @@ namespace OneClickInstallation.Helpers
|
||||
}
|
||||
|
||||
|
||||
public static InstallationComponentsModel GetAvailableComponents(bool enterprise)
|
||||
{
|
||||
var res = CacheGet<InstallationComponentsModel>(enterprise ? "availableEnterpriseComponents" : "availableComponents");
|
||||
return res ?? TagHelper.InitializeAvailableTags(enterprise);
|
||||
}
|
||||
|
||||
public static void SetAvailableComponents(bool enterprise, InstallationComponentsModel value)
|
||||
{
|
||||
CacheSet(enterprise ? "availableEnterpriseComponents" : "availableComponents", value, TimeSpan.FromDays(1));
|
||||
}
|
||||
|
||||
|
||||
public static void ClearUserCache(string userId)
|
||||
{
|
||||
SetConnectionSettings(userId, null);
|
||||
SetInstalledComponents(userId, null);
|
||||
SetSelectedComponents(userId, null);
|
||||
SetInstallationProgress(userId, null);
|
||||
SetOsInfo(userId, null);
|
||||
SetRequestInfo(userId, null);
|
||||
}
|
||||
|
||||
public static void ClearCache()
|
||||
{
|
||||
foreach (var lang in LangHelper.GetLanguages())
|
||||
{
|
||||
SetJsResuorce(new CultureInfo(lang).TwoLetterISOLanguageName, null);
|
||||
}
|
||||
|
||||
SetAvailableComponents(true, null);
|
||||
SetAvailableComponents(false, null);
|
||||
}
|
||||
|
||||
|
||||
private static T CacheGet<T>(string key)
|
||||
{
|
||||
var value = HttpRuntime.Cache.Get(key);
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Web;
|
||||
using OneClickInstallation.Models;
|
||||
using OneClickInstallation.Resources;
|
||||
@ -65,6 +66,47 @@ namespace OneClickInstallation.Helpers
|
||||
return newFileName;
|
||||
}
|
||||
|
||||
public static string SaveFile(string url)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
throw new Exception(OneClickCommonResource.ErrorFileIsNull);
|
||||
|
||||
var uri = new Uri(url);
|
||||
|
||||
var fileName = Path.GetFileName(uri.LocalPath);
|
||||
|
||||
if (string.IsNullOrEmpty(fileName))
|
||||
throw new Exception(OneClickCommonResource.ErrorFileIsNull);
|
||||
|
||||
var folderPath = HttpContext.Current.Server.MapPath(DataFolder + TmpFolder);
|
||||
|
||||
if (!Directory.Exists(folderPath))
|
||||
Directory.CreateDirectory(folderPath);
|
||||
|
||||
var filePath = Path.Combine(folderPath, fileName);
|
||||
|
||||
var index = 1;
|
||||
var newFileName = fileName;
|
||||
|
||||
while (File.Exists(filePath))
|
||||
{
|
||||
newFileName = string.Format("{0} ({1}){2}", Path.GetFileNameWithoutExtension(fileName), index++, Path.GetExtension(fileName));
|
||||
filePath = Path.Combine(folderPath, newFileName);
|
||||
}
|
||||
|
||||
using (var client = new WebClient())
|
||||
{
|
||||
client.DownloadFile(uri, filePath);
|
||||
}
|
||||
|
||||
return newFileName;
|
||||
}
|
||||
|
||||
public static string GetTmpFileVirtualPath(string fileName)
|
||||
{
|
||||
return DataFolder + TmpFolder + "/" + fileName;
|
||||
}
|
||||
|
||||
public static string GetFile(string fileName)
|
||||
{
|
||||
var filePath = Path.Combine(HttpContext.Current.Server.MapPath(DataFolder + TmpFolder), fileName);
|
||||
@ -74,6 +116,14 @@ namespace OneClickInstallation.Helpers
|
||||
throw new Exception(OneClickCommonResource.ErrorFileNotFound);
|
||||
}
|
||||
|
||||
public static void RemoveFile(string filePath)
|
||||
{
|
||||
if (!File.Exists(filePath))
|
||||
throw new Exception(OneClickCommonResource.ErrorFileNotFound);
|
||||
|
||||
File.Delete(filePath);
|
||||
}
|
||||
|
||||
public static void CreateLogFile(string userId, InstallationProgressModel progressModel)
|
||||
{
|
||||
var fileName = "InstallSuccess.log";
|
||||
|
@ -17,11 +17,8 @@
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Web.Configuration;
|
||||
using OneClickInstallation.Classes;
|
||||
using log4net;
|
||||
|
||||
namespace OneClickInstallation.Helpers
|
||||
{
|
||||
@ -39,6 +36,7 @@ namespace OneClickInstallation.Helpers
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static string Languages
|
||||
{
|
||||
get { return GetAppSettings("languages", "en,de,fr,es,ru,lv,it"); }
|
||||
@ -53,6 +51,7 @@ namespace OneClickInstallation.Helpers
|
||||
{
|
||||
get { return GetAppSettings("maxFileSize", 1048576); }
|
||||
}
|
||||
|
||||
|
||||
public static string AnalyticsFileUrl
|
||||
{
|
||||
@ -64,49 +63,126 @@ namespace OneClickInstallation.Helpers
|
||||
get { return GetAppSettings("termsFileUrl", string.Empty); }
|
||||
}
|
||||
|
||||
public static string SupportEmail
|
||||
{
|
||||
get { return GetAppSettings("supportEmail", string.Empty); }
|
||||
}
|
||||
|
||||
public static string SourceUrl
|
||||
{
|
||||
get { return GetAppSettings("sourceUrl", string.Empty); }
|
||||
}
|
||||
|
||||
public static EmailSender EmailSender
|
||||
public static string DevUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
var settings = GetAppSettings("emailSender", string.Empty).Split('|');
|
||||
|
||||
return new EmailSender
|
||||
{
|
||||
Host = settings[0],
|
||||
Port = Convert.ToInt32(settings[1]),
|
||||
Email = settings[2],
|
||||
Password = settings[3],
|
||||
EnableSsl = Convert.ToBoolean(settings[4])
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogManager.GetLogger("ASC").Error(ex.Message, ex);
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
get { return GetAppSettings("devUrl", string.Empty); }
|
||||
}
|
||||
|
||||
public static string HelpUrl
|
||||
{
|
||||
get { return GetAppSettings("helpUrl", string.Empty); }
|
||||
}
|
||||
|
||||
public static string LicenseUrl
|
||||
{
|
||||
get { return GetAppSettings("licenseUrl", string.Empty); }
|
||||
}
|
||||
|
||||
|
||||
public static string DockerCommunityContainerName
|
||||
{
|
||||
get { return GetAppSettings("docker.community-container-name", "onlyoffice-community-server"); }
|
||||
}
|
||||
|
||||
public static string DockerDocumentContainerName
|
||||
{
|
||||
get { return GetAppSettings("docker.document-container-name", "onlyoffice-document-server"); }
|
||||
}
|
||||
|
||||
public static string DockerMailContainerName
|
||||
{
|
||||
get { return GetAppSettings("docker.mail-container-name", "onlyoffice-mail-server"); }
|
||||
}
|
||||
|
||||
public static string DockerControlPanelContainerName
|
||||
{
|
||||
get { return GetAppSettings("docker.controlpanel-container-name", "onlyoffice-control-panel"); }
|
||||
}
|
||||
|
||||
|
||||
public static string DockerCommunityImageName
|
||||
{
|
||||
get { return GetAppSettings("docker.community-image-name", "onlyoffice/communityserver"); }
|
||||
}
|
||||
|
||||
public static string DockerDocumentImageName
|
||||
{
|
||||
get { return GetAppSettings("docker.document-image-name", "onlyoffice/documentserver"); }
|
||||
}
|
||||
|
||||
public static string DockerMailImageName
|
||||
{
|
||||
get { return GetAppSettings("docker.mail-image-name", "onlyoffice/mailserver"); }
|
||||
}
|
||||
|
||||
public static string DockerControlPanelImageName
|
||||
{
|
||||
get { return GetAppSettings("docker.controlpanel-image-name", "onlyoffice/controlpanel"); }
|
||||
}
|
||||
|
||||
|
||||
public static string DockerEnterpriseCommunityImageName
|
||||
{
|
||||
get { return GetAppSettings("docker.enterprise.community-image-name", "onlyoffice4enterprise/communityserver-ee"); }
|
||||
}
|
||||
|
||||
public static string DockerEnterpriseDocumentImageName
|
||||
{
|
||||
get { return GetAppSettings("docker.enterprise.document-image-name", "onlyoffice4enterprise/documentserver-ee"); }
|
||||
}
|
||||
|
||||
public static string DockerEnterpriseMailImageName
|
||||
{
|
||||
get { return GetAppSettings("docker.enterprise.mail-image-name", "onlyoffice/mailserver"); }
|
||||
}
|
||||
|
||||
public static string DockerEnterpriseControlPanelImageName
|
||||
{
|
||||
get { return GetAppSettings("docker.enterprise.controlpanel-image-name", "onlyoffice4enterprise/controlpanel-ee"); }
|
||||
}
|
||||
|
||||
|
||||
public static string DockerHubLoginUrl
|
||||
{
|
||||
get { return GetAppSettings("dockerhub.loginUrl", "https://hub.docker.com/v2/users/login/"); }
|
||||
}
|
||||
|
||||
public static string DockerHubTagsUrlFormat
|
||||
{
|
||||
get { return GetAppSettings("dockerhub.tagsUrlFormat", "https://hub.docker.com/v2/repositories/{0}/tags/"); }
|
||||
}
|
||||
|
||||
public static string DockerHubUserName
|
||||
{
|
||||
get { return GetAppSettings("dockerhub.userName", string.Empty); }
|
||||
}
|
||||
|
||||
public static string DockerHubPassword
|
||||
{
|
||||
get { return GetAppSettings("dockerhub.password", string.Empty); }
|
||||
}
|
||||
|
||||
|
||||
public static string CacheKey
|
||||
{
|
||||
get { return GetAppSettings("cacheKey", string.Empty); }
|
||||
}
|
||||
|
||||
|
||||
public const string RemoteServerDir = "/app/onlyoffice";
|
||||
|
||||
public const string TrialFileName = "trial.lic";
|
||||
|
||||
public const string InstallationStopPattern = "INSTALLATION-STOP";
|
||||
public const string InstallationRebootPattern = "INSTALLATION-STOP-REBOOT";
|
||||
public const string InstallationSuccessPattern = "INSTALLATION-STOP-SUCCESS";
|
||||
public const string InstallationErrorPattern = "INSTALLATION-STOP-ERROR";
|
||||
|
||||
|
||||
private static T GetAppSettings<T>(string key, T defaultValue)
|
||||
{
|
||||
var configSetting = WebConfigurationManager.AppSettings[key];
|
||||
|
@ -52,7 +52,7 @@ namespace OneClickInstallation.Helpers
|
||||
|
||||
}
|
||||
|
||||
public static InstallationComponentsModel Connect(string userId, ConnectionSettingsModel connectionSettings)
|
||||
public static Tuple<OsInfo, InstallationComponentsModel> Connect(string userId, ConnectionSettingsModel connectionSettings)
|
||||
{
|
||||
using (var installationManager = new InstallationManager(userId, connectionSettings))
|
||||
{
|
||||
|
174
web/Helpers/TagHelper.cs
Normal file
@ -0,0 +1,174 @@
|
||||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2015
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
*
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using OneClickInstallation.Classes;
|
||||
using OneClickInstallation.Models;
|
||||
using log4net;
|
||||
|
||||
namespace OneClickInstallation.Helpers
|
||||
{
|
||||
public class TagHelper
|
||||
{
|
||||
public static InstallationComponentsModel InitializeAvailableTags(bool enterprise)
|
||||
{
|
||||
var available = new InstallationComponentsModel
|
||||
{
|
||||
CommunityServerVersion = GetLatestTagName(GetImageTags(enterprise ? Settings.DockerEnterpriseCommunityImageName : Settings.DockerCommunityImageName)),
|
||||
DocumentServerVersion = GetLatestTagName(GetImageTags(enterprise ? Settings.DockerEnterpriseDocumentImageName : Settings.DockerDocumentImageName)),
|
||||
MailServerVersion = GetLatestTagName(GetImageTags(enterprise ? Settings.DockerEnterpriseMailImageName : Settings.DockerMailImageName)),
|
||||
ControlPanelVersion = GetLatestTagName(GetImageTags(enterprise ? Settings.DockerEnterpriseControlPanelImageName : Settings.DockerControlPanelImageName)),
|
||||
};
|
||||
|
||||
CacheHelper.SetAvailableComponents(enterprise, available);
|
||||
|
||||
return available;
|
||||
}
|
||||
|
||||
public static List<ImageTag> GetImageTags(string imageName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(imageName))
|
||||
throw new ArgumentNullException("imageName");
|
||||
|
||||
try
|
||||
{
|
||||
var req = System.Net.WebRequest.Create(Settings.DockerHubLoginUrl);
|
||||
|
||||
req.Method = "POST";
|
||||
req.ContentType = "application/json";
|
||||
|
||||
var credentials = string.Empty;
|
||||
|
||||
if (!string.IsNullOrEmpty(Settings.DockerHubUserName) && !string.IsNullOrEmpty(Settings.DockerHubPassword))
|
||||
credentials = JsonConvert.SerializeObject(new
|
||||
{
|
||||
username = Settings.DockerHubUserName,
|
||||
password = Settings.DockerHubPassword
|
||||
});
|
||||
|
||||
var data = Encoding.ASCII.GetBytes(credentials);
|
||||
|
||||
req.ContentLength = data.Length;
|
||||
|
||||
using (var stream = req.GetRequestStream())
|
||||
{
|
||||
stream.Write(data, 0, data.Length);
|
||||
}
|
||||
|
||||
string output;
|
||||
|
||||
using (var resp = req.GetResponse())
|
||||
{
|
||||
using (var stream = resp.GetResponseStream())
|
||||
{
|
||||
if (stream == null) return null;
|
||||
|
||||
var sr = new StreamReader(stream);
|
||||
output = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
}
|
||||
}
|
||||
|
||||
var token = string.Empty;
|
||||
dynamic obj;
|
||||
|
||||
if (!string.IsNullOrEmpty(output))
|
||||
{
|
||||
obj = JsonConvert.DeserializeObject<dynamic>(output);
|
||||
token = obj.token;
|
||||
}
|
||||
|
||||
req = System.Net.WebRequest.Create(string.Format(Settings.DockerHubTagsUrlFormat, imageName));
|
||||
|
||||
req.Method = "GET";
|
||||
|
||||
if(!string.IsNullOrEmpty(token))
|
||||
req.Headers.Add("Authorization", "JWT " + token);
|
||||
|
||||
using (var resp = req.GetResponse())
|
||||
{
|
||||
using (var stream = resp.GetResponseStream())
|
||||
{
|
||||
if (stream == null) return null;
|
||||
|
||||
var sr = new StreamReader(stream);
|
||||
output = sr.ReadToEnd();
|
||||
sr.Close();
|
||||
}
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(output))
|
||||
return null;
|
||||
|
||||
obj = JsonConvert.DeserializeObject<dynamic>(output);
|
||||
return ((IEnumerable<dynamic>) obj.results).Select(x => new ImageTag {Name = x.name}).ToList();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogManager.GetLogger("ASC").Error(ex.Message, ex);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private static string GetLatestTagName(List<ImageTag> imageTags)
|
||||
{
|
||||
if (imageTags == null || imageTags.Count == 0)
|
||||
return null;
|
||||
|
||||
Version latest = null;
|
||||
var unparsed = new List<string>();
|
||||
|
||||
foreach (var imageTag in imageTags)
|
||||
{
|
||||
Version current;
|
||||
if (Version.TryParse(imageTag.Name, out current))
|
||||
{
|
||||
if (latest == null || current > latest)
|
||||
latest = current;
|
||||
}
|
||||
else
|
||||
{
|
||||
unparsed.Add(imageTag.Name);
|
||||
}
|
||||
}
|
||||
|
||||
if (latest != null) return latest.ToString();
|
||||
|
||||
if (unparsed.Any())
|
||||
{
|
||||
return unparsed.Contains("latest") ? "latest" : unparsed.First();
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static string BuildBasicAuth(string username, string password)
|
||||
{
|
||||
var authInfo = string.Format("{0}:{1}", username, password);
|
||||
|
||||
return string.Format("Basic {0}", Convert.ToBase64String(Encoding.Default.GetBytes(authInfo)));
|
||||
}
|
||||
}
|
||||
}
|
@ -25,5 +25,7 @@ namespace OneClickInstallation.Models
|
||||
public string UserName { get; set; }
|
||||
public string Password { get; set; }
|
||||
public string SshKey { get; set; }
|
||||
public string LicenseKey { get; set; }
|
||||
public bool Enterprise { get; set; }
|
||||
}
|
||||
}
|
@ -21,14 +21,33 @@ namespace OneClickInstallation.Models
|
||||
{
|
||||
public class InstallationComponentsModel
|
||||
{
|
||||
public bool CommunityServer { get; set; }
|
||||
public bool DocumentServer { get; set; }
|
||||
public bool MailServer { get; set; }
|
||||
public string CommunityServerVersion { get; set; }
|
||||
public string DocumentServerVersion { get; set; }
|
||||
public string MailServerVersion { get; set; }
|
||||
public string MailDomain { get; set; }
|
||||
public string ControlPanelVersion { get; set; }
|
||||
public bool LicenseFileExist { get; set; }
|
||||
|
||||
public bool IsEmpty
|
||||
{
|
||||
get { return !CommunityServer && !DocumentServer && !MailServer; }
|
||||
get
|
||||
{
|
||||
return string.IsNullOrEmpty(CommunityServerVersion) &&
|
||||
string.IsNullOrEmpty(DocumentServerVersion) &&
|
||||
string.IsNullOrEmpty(MailServerVersion) &&
|
||||
string.IsNullOrEmpty(ControlPanelVersion);
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFull
|
||||
{
|
||||
get
|
||||
{
|
||||
return !string.IsNullOrEmpty(CommunityServerVersion) &&
|
||||
!string.IsNullOrEmpty(DocumentServerVersion) &&
|
||||
!string.IsNullOrEmpty(MailServerVersion) &&
|
||||
!string.IsNullOrEmpty(ControlPanelVersion);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -34,9 +34,9 @@ namespace OneClickInstallation.Models
|
||||
GetOsInfo,
|
||||
CheckPorts,
|
||||
InstallDocker,
|
||||
RebootServer,
|
||||
InstallDocumentServer,
|
||||
InstallMailServer,
|
||||
InstallControlPanel,
|
||||
InstallCommunityServer,
|
||||
WarmUp,
|
||||
End
|
||||
|
31
web/Models/RequestInfoModel.cs
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
*
|
||||
* (c) Copyright Ascensio System Limited 2010-2015
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and limitations under the License.
|
||||
*
|
||||
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
|
||||
*
|
||||
*/
|
||||
|
||||
namespace OneClickInstallation.Models
|
||||
{
|
||||
public class RequestInfoModel
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string Phone { get; set; }
|
||||
public string CompanyName { get; set; }
|
||||
public int CompanySize { get; set; }
|
||||
public string Position { get; set; }
|
||||
}
|
||||
}
|
@ -42,11 +42,21 @@
|
||||
<Reference Include="ASC.Common">
|
||||
<HintPath>..\references\ASC.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASC.Core.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\references\ASC.Core.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="ASC.Resource.Data">
|
||||
<HintPath>..\references\ASC.Resource.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="dotless.Core">
|
||||
<HintPath>..\packages\dotless.1.3.1.0\lib\dotless.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="FileConverterUtils2">
|
||||
<HintPath>..\references\FileConverterUtils2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.1.2.10\lib\2.0\log4net.dll</HintPath>
|
||||
<HintPath>..\packages\log4net.2.0.3\lib\net40-client\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
@ -100,9 +110,8 @@
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebPages.2.0.20710.0\lib\net40\System.Web.WebPages.Razor.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="TMResourceData">
|
||||
<HintPath>..\references\TMResourceData.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.XML" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WebGrease">
|
||||
<HintPath>..\packages\WebGrease.1.6.0\lib\WebGrease.dll</HintPath>
|
||||
</Reference>
|
||||
@ -111,15 +120,16 @@
|
||||
<Content Include="404.htm" />
|
||||
<Content Include="500.htm" />
|
||||
<Content Include="Content\images\combo_gray.png" />
|
||||
<Content Include="Content\images\coming_soon.png" />
|
||||
<Content Include="Content\images\corner_top.gif" />
|
||||
<Content Include="Content\images\flags.png" />
|
||||
<Content Include="Content\images\loader.gif" />
|
||||
<Content Include="Content\images\social.png" />
|
||||
<Content Include="Content\images\logo.png" />
|
||||
<Content Include="Content\images\sprite.png" />
|
||||
<Content Include="Content\images\cp_features.png" />
|
||||
<Content Include="Content\images\step.png" />
|
||||
<Content Include="Content\images\toast_icon01.png" />
|
||||
<Content Include="Content\images\toast_icon02.png" />
|
||||
<Content Include="Content\images\toast_icon03.png" />
|
||||
<Content Include="favicon.ico" />
|
||||
<Content Include="Global.asax" />
|
||||
<Content Include="Scripts\common.js" />
|
||||
@ -138,11 +148,12 @@
|
||||
<Compile Include="App_Start\BundleConfig.cs" />
|
||||
<Compile Include="App_Start\LessTransform.cs" />
|
||||
<Compile Include="App_Start\RouteConfig.cs" />
|
||||
<Compile Include="Classes\ImageTag.cs" />
|
||||
<Compile Include="Classes\OsInfo.cs" />
|
||||
<Compile Include="Classes\EmailSender.cs" />
|
||||
<Compile Include="Classes\InstallationManager.cs" />
|
||||
<Compile Include="Helpers\CacheHelper.cs" />
|
||||
<Compile Include="Helpers\CookieHelper.cs" />
|
||||
<Compile Include="Helpers\TagHelper.cs" />
|
||||
<Compile Include="Helpers\SshHelper.cs" />
|
||||
<Compile Include="Helpers\FileHelper.cs" />
|
||||
<Compile Include="Helpers\Settings.cs" />
|
||||
@ -152,6 +163,7 @@
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helpers\LangHelper.cs" />
|
||||
<Compile Include="Models\RequestInfoModel.cs" />
|
||||
<Compile Include="Models\InstallationComponentsModel.cs" />
|
||||
<Compile Include="Models\InstallationProgressModel.cs" />
|
||||
<Compile Include="Models\ConnectionSettingsModel.cs" />
|
||||
@ -242,14 +254,34 @@
|
||||
<Content Include="Executables\tools\check-ports.sh" />
|
||||
<Content Include="Executables\tools\get-os-info.sh" />
|
||||
<Content Include="Executables\run-community-server.sh" />
|
||||
<Content Include="Executables\run-control-panel.sh" />
|
||||
<Content Include="Executables\run-document-server.sh" />
|
||||
<Content Include="Executables\run-mail-server.sh" />
|
||||
<Content Include="Executables\tools\check-previous-version.sh" />
|
||||
<Content Include="Executables\tools\make-dir.sh" />
|
||||
<Content Include="Executables\tools\get-available-version.sh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Executables\tools\make-network.sh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Executables\tools\check-bindings.sh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Executables\tools\pull-image.sh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Executables\tools\remove-container.sh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Executables\tools\login-docker.sh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Executables\install.sh" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Executables\restart.sh" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
59
web/Resources/OneClickCommonResource.Designer.cs
generated
@ -97,7 +97,7 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to © Ascensio System SIA 2015.
|
||||
/// Looks up a localized string similar to © Ascensio System SIA {0}. All rights reserved.
|
||||
/// </summary>
|
||||
public static string Copyright {
|
||||
get {
|
||||
@ -115,20 +115,20 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Empty mail sender settings.
|
||||
/// Looks up a localized string similar to Open Your Web-Office.
|
||||
/// </summary>
|
||||
public static string EmailSenderIsNull {
|
||||
public static string EnterOnlyoffice {
|
||||
get {
|
||||
return ResourceManager.GetString("EmailSenderIsNull", resourceCulture);
|
||||
return ResourceManager.GetString("EnterOnlyoffice", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Access your ONLYOFFICE.
|
||||
/// Looks up a localized string similar to File extension is incorrect.
|
||||
/// </summary>
|
||||
public static string Enter {
|
||||
public static string ErrorFileExt {
|
||||
get {
|
||||
return ResourceManager.GetString("Enter", resourceCulture);
|
||||
return ResourceManager.GetString("ErrorFileExt", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -168,6 +168,24 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to License file is already exist.
|
||||
/// </summary>
|
||||
public static string ErrorLicenseFileExist {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorLicenseFileExist", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to License file is not valid.
|
||||
/// </summary>
|
||||
public static string ErrorLicenseFileNotValid {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorLicenseFileNotValid", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Progress is null.
|
||||
/// </summary>
|
||||
@ -177,6 +195,15 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Request Info is null.
|
||||
/// </summary>
|
||||
public static string ErrorRequestInfoIsNull {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorRequestInfoIsNull", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Community and Documents Servers are required.
|
||||
/// </summary>
|
||||
@ -222,6 +249,15 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Get License File.
|
||||
/// </summary>
|
||||
public static string GetLicenseFile {
|
||||
get {
|
||||
return ResourceManager.GetString("GetLicenseFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Google+.
|
||||
/// </summary>
|
||||
@ -267,15 +303,6 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Notify me.
|
||||
/// </summary>
|
||||
public static string Notify {
|
||||
get {
|
||||
return ResourceManager.GetString("Notify", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to OK.
|
||||
/// </summary>
|
||||
|
@ -130,16 +130,16 @@
|
||||
<value>Control panel</value>
|
||||
</data>
|
||||
<data name="Copyright" xml:space="preserve">
|
||||
<value>© Ascensio System SIA 2015</value>
|
||||
<value>© Ascensio System SIA {0}. All rights reserved</value>
|
||||
</data>
|
||||
<data name="Disconnect" xml:space="preserve">
|
||||
<value>Disconnect</value>
|
||||
</data>
|
||||
<data name="EmailSenderIsNull" xml:space="preserve">
|
||||
<value>Empty mail sender settings</value>
|
||||
<data name="EnterOnlyoffice" xml:space="preserve">
|
||||
<value>Open Your Web-Office</value>
|
||||
</data>
|
||||
<data name="Enter" xml:space="preserve">
|
||||
<value>Access your ONLYOFFICE</value>
|
||||
<data name="ErrorFileExt" xml:space="preserve">
|
||||
<value>File extension is incorrect</value>
|
||||
</data>
|
||||
<data name="ErrorFileIsNull" xml:space="preserve">
|
||||
<value>File is null</value>
|
||||
@ -153,9 +153,18 @@
|
||||
<data name="ErrorFilesNotTransfered" xml:space="preserve">
|
||||
<value>The files are not transferred</value>
|
||||
</data>
|
||||
<data name="ErrorLicenseFileExist" xml:space="preserve">
|
||||
<value>License file is already exist</value>
|
||||
</data>
|
||||
<data name="ErrorLicenseFileNotValid" xml:space="preserve">
|
||||
<value>License file is not valid</value>
|
||||
</data>
|
||||
<data name="ErrorProgressIsNull" xml:space="preserve">
|
||||
<value>Progress is null</value>
|
||||
</data>
|
||||
<data name="ErrorRequestInfoIsNull" xml:space="preserve">
|
||||
<value>Request Info is null</value>
|
||||
</data>
|
||||
<data name="ErrorRequiredComponents" xml:space="preserve">
|
||||
<value>Community and Documents Servers are required</value>
|
||||
</data>
|
||||
@ -171,6 +180,9 @@
|
||||
<data name="FollowUs" xml:space="preserve">
|
||||
<value>Follow us on:</value>
|
||||
</data>
|
||||
<data name="GetLicenseFile" xml:space="preserve">
|
||||
<value>Get License File</value>
|
||||
</data>
|
||||
<data name="Google" xml:space="preserve">
|
||||
<value>Google+</value>
|
||||
</data>
|
||||
@ -186,9 +198,6 @@
|
||||
<data name="MetaKeywords" xml:space="preserve">
|
||||
<value>online document editor, project management tool, business tools, crm system, online collaboration, cloud office, online word, documents management, online spreadsheets, online office, collaborative editing, online office application, online docs</value>
|
||||
</data>
|
||||
<data name="Notify" xml:space="preserve">
|
||||
<value>Notify me</value>
|
||||
</data>
|
||||
<data name="Ok" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
|
273
web/Resources/OneClickHomePageResource.Designer.cs
generated
@ -105,6 +105,24 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Company name.
|
||||
/// </summary>
|
||||
public static string CompanyNamePlaceholder {
|
||||
get {
|
||||
return ResourceManager.GetString("CompanyNamePlaceholder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Company size.
|
||||
/// </summary>
|
||||
public static string CompanySizePlaceholder {
|
||||
get {
|
||||
return ResourceManager.GetString("CompanySizePlaceholder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Connection error.
|
||||
/// </summary>
|
||||
@ -124,7 +142,7 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Check connection setting and try again..
|
||||
/// Looks up a localized string similar to Check the connection settings and make sure that the remote server allows SSH authentication..
|
||||
/// </summary>
|
||||
public static string ConnectionErrorText_2 {
|
||||
get {
|
||||
@ -169,11 +187,20 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to An ONLYOFFICE Installer used to automate the deployement process of ONLYOFFICE Free Edition using the Docker container technology. ONLYOFFICE Free Edition is an open source software that comprises online document editors, collaboration system and mail server, all to resolve the collaboration issues for both small and medium-sized teams..
|
||||
/// Looks up a localized string similar to An ONLYOFFICE Installer used to automate the deployment process of ONLYOFFICE Community Edition using the Docker container technology. ONLYOFFICE Community Edition comprises online document editors, collaboration system and mail server, all to resolve the collaboration issues for both small and medium-sized teams..
|
||||
/// </summary>
|
||||
public static string ConnectionSettingsFormDescText {
|
||||
public static string ConnectionSettingsFormDescText_Community {
|
||||
get {
|
||||
return ResourceManager.GetString("ConnectionSettingsFormDescText", resourceCulture);
|
||||
return ResourceManager.GetString("ConnectionSettingsFormDescText_Community", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to An ONLYOFFICE Installer used to automate the deployment process of ONLYOFFICE Enterprise Edition using the Docker container technology. ONLYOFFICE Enterprise Edition comprises online document editors, collaboration system and mail server, all to resolve the collaboration issues for both small and medium-sized teams. ONLYOFFICE Control Panel included into this installation will help you to configure the corporate web-office quickly and easily..
|
||||
/// </summary>
|
||||
public static string ConnectionSettingsFormDescText_Enterprise {
|
||||
get {
|
||||
return ResourceManager.GetString("ConnectionSettingsFormDescText_Enterprise", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -214,74 +241,29 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Audit Trail.
|
||||
/// Looks up a localized string similar to Control Panel.
|
||||
/// </summary>
|
||||
public static string ContrrolPanelFeatureAudit {
|
||||
public static string ControlPanel {
|
||||
get {
|
||||
return ResourceManager.GetString("ContrrolPanelFeatureAudit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Backup.
|
||||
/// </summary>
|
||||
public static string ContrrolPanelFeatureBackup {
|
||||
get {
|
||||
return ResourceManager.GetString("ContrrolPanelFeatureBackup", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to HTTPS.
|
||||
/// </summary>
|
||||
public static string ContrrolPanelFeatureHttps {
|
||||
get {
|
||||
return ResourceManager.GetString("ContrrolPanelFeatureHttps", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Update.
|
||||
/// </summary>
|
||||
public static string ContrrolPanelFeatureUpdate {
|
||||
get {
|
||||
return ResourceManager.GetString("ContrrolPanelFeatureUpdate", resourceCulture);
|
||||
return ResourceManager.GetString("ControlPanel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Control Panel.
|
||||
/// </summary>
|
||||
public static string ContrrolPanelHdr {
|
||||
public static string ControlPanelHdr {
|
||||
get {
|
||||
return ResourceManager.GetString("ContrrolPanelHdr", resourceCulture);
|
||||
return ResourceManager.GetString("ControlPanelHdr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ONLYOFFICE Control Panel is a new way to manage and configure your server in one click. It offers features like ....
|
||||
/// Looks up a localized string similar to ONLYOFFICE Control Panel is a set of automation tools designed to simplify the web-office settings management, such as HTTPS, Updates, Rebranding, LDAP, Data Backup and Restore, Health Check, Login History and Audit Trail..
|
||||
/// </summary>
|
||||
public static string ContrrolPanelText {
|
||||
public static string ControlPanelText_Enterprise {
|
||||
get {
|
||||
return ResourceManager.GetString("ContrrolPanelText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Customize settings*.
|
||||
/// </summary>
|
||||
public static string CustomStepText {
|
||||
get {
|
||||
return ResourceManager.GetString("CustomStepText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to * Advanced configuration settings provided on commercial basis.
|
||||
/// </summary>
|
||||
public static string CustomStepTitleText {
|
||||
get {
|
||||
return ResourceManager.GetString("CustomStepTitleText", resourceCulture);
|
||||
return ResourceManager.GetString("ControlPanelText_Enterprise", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -313,7 +295,7 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enter your email.
|
||||
/// Looks up a localized string similar to Email.
|
||||
/// </summary>
|
||||
public static string EmailPlaceholder {
|
||||
get {
|
||||
@ -321,6 +303,24 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} employees.
|
||||
/// </summary>
|
||||
public static string EmployeesCount {
|
||||
get {
|
||||
return ResourceManager.GetString("EmployeesCount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to More than {0} employees.
|
||||
/// </summary>
|
||||
public static string EmployeesMoreThanCount {
|
||||
get {
|
||||
return ResourceManager.GetString("EmployeesMoreThanCount", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Installation error.
|
||||
/// </summary>
|
||||
@ -339,6 +339,24 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to FAQ.
|
||||
/// </summary>
|
||||
public static string FAQ {
|
||||
get {
|
||||
return ResourceManager.GetString("FAQ", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Get trial License File.
|
||||
/// </summary>
|
||||
public static string GetLicenseFile {
|
||||
get {
|
||||
return ResourceManager.GetString("GetLicenseFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Hardware requirements.
|
||||
/// </summary>
|
||||
@ -456,6 +474,15 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Installing Control Panel.
|
||||
/// </summary>
|
||||
public static string InstallationProgressStep_InstallControlPanel {
|
||||
get {
|
||||
return ResourceManager.GetString("InstallationProgressStep_InstallControlPanel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Installing Docker service.
|
||||
/// </summary>
|
||||
@ -483,15 +510,6 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Rebooting the server.
|
||||
/// </summary>
|
||||
public static string InstallationProgressStep_RebootServer {
|
||||
get {
|
||||
return ResourceManager.GetString("InstallationProgressStep_RebootServer", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Starting the installstion.
|
||||
/// </summary>
|
||||
@ -537,6 +555,33 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Learn more.
|
||||
/// </summary>
|
||||
public static string LearnMore {
|
||||
get {
|
||||
return ResourceManager.GetString("LearnMore", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to License File.
|
||||
/// </summary>
|
||||
public static string LicenseFile {
|
||||
get {
|
||||
return ResourceManager.GetString("LicenseFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Upload License File.
|
||||
/// </summary>
|
||||
public static string LicensePlaceholder {
|
||||
get {
|
||||
return ResourceManager.GetString("LicensePlaceholder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Enter Domain Name.
|
||||
/// </summary>
|
||||
@ -600,6 +645,15 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Name.
|
||||
/// </summary>
|
||||
public static string NamePlaceholder {
|
||||
get {
|
||||
return ResourceManager.GetString("NamePlaceholder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to CoreOS 647.0.0 (stable).
|
||||
/// </summary>
|
||||
@ -619,7 +673,7 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to any other distributive with kernel version 3.19.
|
||||
/// Looks up a localized string similar to any other distributive with kernel version 3.10 or later.
|
||||
/// </summary>
|
||||
public static string OperatingSystemOther {
|
||||
get {
|
||||
@ -654,6 +708,33 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Phone.
|
||||
/// </summary>
|
||||
public static string PhonePlaceholder {
|
||||
get {
|
||||
return ResourceManager.GetString("PhonePlaceholder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Position.
|
||||
/// </summary>
|
||||
public static string PositionPlaceholder {
|
||||
get {
|
||||
return ResourceManager.GetString("PositionPlaceholder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Request form.
|
||||
/// </summary>
|
||||
public static string RequestForm {
|
||||
get {
|
||||
return ResourceManager.GetString("RequestForm", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Minimum server requirements:.
|
||||
/// </summary>
|
||||
@ -664,7 +745,7 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Congratulations, the installation process is successfully completed!.
|
||||
/// Looks up a localized string similar to Congratulations! You have successfully installed ONLYOFFICE!.
|
||||
/// </summary>
|
||||
public static string ServerSettingsFormDescHdr {
|
||||
get {
|
||||
@ -673,20 +754,20 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Control Panel.
|
||||
/// Looks up a localized string similar to Your corporate web-office is ready..
|
||||
/// </summary>
|
||||
public static string ServerSettingsFormHdr {
|
||||
public static string ServerSettingsFormDescText_1 {
|
||||
get {
|
||||
return ResourceManager.GetString("ServerSettingsFormHdr", resourceCulture);
|
||||
return ResourceManager.GetString("ServerSettingsFormDescText_1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The Control Panel is in beta stage and will be available soon. Enter your email below to be the first to learn about the release..
|
||||
/// Looks up a localized string similar to To start working right now, click the Open Your Web-Office button..
|
||||
/// </summary>
|
||||
public static string ServerSettingsFormText {
|
||||
public static string ServerSettingsFormDescText_2 {
|
||||
get {
|
||||
return ResourceManager.GetString("ServerSettingsFormText", resourceCulture);
|
||||
return ResourceManager.GetString("ServerSettingsFormDescText_2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -735,24 +816,6 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Community and Document Server will be installed by default. Select Mail Server if you need it..
|
||||
/// </summary>
|
||||
public static string SetupFormText {
|
||||
get {
|
||||
return ResourceManager.GetString("SetupFormText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to We recommended that you install Mail Server together with other components. In case you decide to install it later you will need to remove all previously installed ONLYOFFICE components for successful installation..
|
||||
/// </summary>
|
||||
public static string SetupMailServerDesc {
|
||||
get {
|
||||
return ResourceManager.GetString("SetupMailServerDesc", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Software requirements.
|
||||
/// </summary>
|
||||
@ -799,11 +862,20 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to You need to manually remove previously installed ONLYOFFICE components before you can continue installation..
|
||||
/// Looks up a localized string similar to After the correct filling in of the request we automatically generate the license file for the trial version, which will be available to you within 30 days..
|
||||
/// </summary>
|
||||
public static string UpdadeSetupOptionsDesc {
|
||||
public static string TrialDescText {
|
||||
get {
|
||||
return ResourceManager.GetString("UpdadeSetupOptionsDesc", resourceCulture);
|
||||
return ResourceManager.GetString("TrialDescText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Your license file has been successfully created and will be automatically inserted in the field..
|
||||
/// </summary>
|
||||
public static string TrialReadyText {
|
||||
get {
|
||||
return ResourceManager.GetString("TrialReadyText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
@ -815,5 +887,14 @@ namespace OneClickInstallation.Resources {
|
||||
return ResourceManager.GetString("UserNamePlaceholder", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start using.
|
||||
/// </summary>
|
||||
public static string UsingStepText {
|
||||
get {
|
||||
return ResourceManager.GetString("UsingStepText", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -124,7 +124,7 @@
|
||||
<value>Could not connect to the server.</value>
|
||||
</data>
|
||||
<data name="ConnectionErrorText_2" xml:space="preserve">
|
||||
<value>Check connection setting and try again.</value>
|
||||
<value>Check the connection settings and make sure that the remote server allows SSH authentication.</value>
|
||||
</data>
|
||||
<data name="ConnectionSettingsFormText" xml:space="preserve">
|
||||
<value>Before you start the installation process, you need to connect to your server. Fill out the form below and click the 'CONNECT' button.</value>
|
||||
@ -213,9 +213,6 @@
|
||||
<data name="ConnectStepText" xml:space="preserve">
|
||||
<value>Connect your server</value>
|
||||
</data>
|
||||
<data name="CustomStepText" xml:space="preserve">
|
||||
<value>Customize settings*</value>
|
||||
</data>
|
||||
<data name="DocumentServer" xml:space="preserve">
|
||||
<value>Document Server</value>
|
||||
</data>
|
||||
@ -231,9 +228,6 @@
|
||||
<data name="SetupFormHdr" xml:space="preserve">
|
||||
<value>Setup Options</value>
|
||||
</data>
|
||||
<data name="SetupFormText" xml:space="preserve">
|
||||
<value>Community and Document Server will be installed by default. Select Mail Server if you need it.</value>
|
||||
</data>
|
||||
<data name="MailServer" xml:space="preserve">
|
||||
<value>Mail Server</value>
|
||||
</data>
|
||||
@ -285,9 +279,6 @@
|
||||
<data name="InstallationProgressStep_InstallDocker" xml:space="preserve">
|
||||
<value>Installing Docker service</value>
|
||||
</data>
|
||||
<data name="InstallationProgressStep_RebootServer" xml:space="preserve">
|
||||
<value>Rebooting the server</value>
|
||||
</data>
|
||||
<data name="InstallationProgressStep_InstallDocumentServer" xml:space="preserve">
|
||||
<value>Installing Document Server</value>
|
||||
</data>
|
||||
@ -306,35 +297,8 @@
|
||||
<data name="SetupFormDescProgressText" xml:space="preserve">
|
||||
<value>The ONLYOFFICE installation process may take a few minutes. Please wait.</value>
|
||||
</data>
|
||||
<data name="ContrrolPanelFeatureBackup" xml:space="preserve">
|
||||
<value>Backup</value>
|
||||
</data>
|
||||
<data name="ContrrolPanelFeatureHttps" xml:space="preserve">
|
||||
<value>HTTPS</value>
|
||||
</data>
|
||||
<data name="ContrrolPanelFeatureAudit" xml:space="preserve">
|
||||
<value>Audit Trail</value>
|
||||
</data>
|
||||
<data name="ContrrolPanelFeatureUpdate" xml:space="preserve">
|
||||
<value>Update</value>
|
||||
</data>
|
||||
<data name="ContrrolPanelHdr" xml:space="preserve">
|
||||
<value>Control Panel</value>
|
||||
</data>
|
||||
<data name="ContrrolPanelText" xml:space="preserve">
|
||||
<value>ONLYOFFICE Control Panel is a new way to manage and configure your server in one click. It offers features like ...</value>
|
||||
</data>
|
||||
<data name="EmailPlaceholder" xml:space="preserve">
|
||||
<value>Enter your email</value>
|
||||
</data>
|
||||
<data name="ServerSettingsFormDescHdr" xml:space="preserve">
|
||||
<value>Congratulations, the installation process is successfully completed!</value>
|
||||
</data>
|
||||
<data name="ServerSettingsFormHdr" xml:space="preserve">
|
||||
<value>Control Panel</value>
|
||||
</data>
|
||||
<data name="ServerSettingsFormText" xml:space="preserve">
|
||||
<value>The Control Panel is in beta stage and will be available soon. Enter your email below to be the first to learn about the release.</value>
|
||||
<value>Congratulations! You have successfully installed ONLYOFFICE!</value>
|
||||
</data>
|
||||
<data name="SourceDesc" xml:space="preserve">
|
||||
<value>ONLYOFFICE Installer is distributed under the Apache license. The source code is listed on GitHub.</value>
|
||||
@ -342,31 +306,94 @@
|
||||
<data name="SourceLinkText" xml:space="preserve">
|
||||
<value>Fork me on GitHub</value>
|
||||
</data>
|
||||
<data name="CustomStepTitleText" xml:space="preserve">
|
||||
<value>* Advanced configuration settings provided on commercial basis</value>
|
||||
</data>
|
||||
<data name="SetupFormDescHdr" xml:space="preserve">
|
||||
<value>Congratulations! Server connection established successfully.</value>
|
||||
</data>
|
||||
<data name="ConnectionSettingsConnectedFormDescText" xml:space="preserve">
|
||||
<value>To connect to a different server, you will need to disconnect first.</value>
|
||||
</data>
|
||||
<data name="ConnectionSettingsFormDescText" xml:space="preserve">
|
||||
<value>An ONLYOFFICE Installer used to automate the deployement process of ONLYOFFICE Free Edition using the Docker container technology. ONLYOFFICE Free Edition is an open source software that comprises online document editors, collaboration system and mail server, all to resolve the collaboration issues for both small and medium-sized teams.</value>
|
||||
</data>
|
||||
<data name="SetupFormDescText" xml:space="preserve">
|
||||
<value>Read the information below to choose the ONLYOFFICE components that suit your needs best.</value>
|
||||
</data>
|
||||
<data name="UpdadeSetupOptionsDesc" xml:space="preserve">
|
||||
<value>You need to manually remove previously installed ONLYOFFICE components before you can continue installation.</value>
|
||||
</data>
|
||||
<data name="SetupMailServerDesc" xml:space="preserve">
|
||||
<value>We recommended that you install Mail Server together with other components. In case you decide to install it later you will need to remove all previously installed ONLYOFFICE components for successful installation.</value>
|
||||
</data>
|
||||
<data name="OperatingSystemCoreOS" xml:space="preserve">
|
||||
<value>CoreOS 647.0.0 (stable)</value>
|
||||
</data>
|
||||
<data name="OperatingSystemOther" xml:space="preserve">
|
||||
<value>any other distributive with kernel version 3.19</value>
|
||||
<value>any other distributive with kernel version 3.10 or later</value>
|
||||
</data>
|
||||
<data name="FAQ" xml:space="preserve">
|
||||
<value>FAQ</value>
|
||||
</data>
|
||||
<data name="LicensePlaceholder" xml:space="preserve">
|
||||
<value>Upload License File</value>
|
||||
</data>
|
||||
<data name="InstallationProgressStep_InstallControlPanel" xml:space="preserve">
|
||||
<value>Installing Control Panel</value>
|
||||
</data>
|
||||
<data name="ControlPanel" xml:space="preserve">
|
||||
<value>Control Panel</value>
|
||||
</data>
|
||||
<data name="ConnectionSettingsFormDescText_Enterprise" xml:space="preserve">
|
||||
<value>An ONLYOFFICE Installer used to automate the deployment process of ONLYOFFICE Enterprise Edition using the Docker container technology. ONLYOFFICE Enterprise Edition comprises online document editors, collaboration system and mail server, all to resolve the collaboration issues for both small and medium-sized teams. ONLYOFFICE Control Panel included into this installation will help you to configure the corporate web-office quickly and easily.</value>
|
||||
</data>
|
||||
<data name="ControlPanelHdr" xml:space="preserve">
|
||||
<value>Control Panel</value>
|
||||
</data>
|
||||
<data name="ControlPanelText_Enterprise" xml:space="preserve">
|
||||
<value>ONLYOFFICE Control Panel is a set of automation tools designed to simplify the web-office settings management, such as HTTPS, Updates, Rebranding, LDAP, Data Backup and Restore, Health Check, Login History and Audit Trail.</value>
|
||||
</data>
|
||||
<data name="UsingStepText" xml:space="preserve">
|
||||
<value>Start using</value>
|
||||
</data>
|
||||
<data name="ServerSettingsFormDescText_1" xml:space="preserve">
|
||||
<value>Your corporate web-office is ready.</value>
|
||||
</data>
|
||||
<data name="ServerSettingsFormDescText_2" xml:space="preserve">
|
||||
<value>To start working right now, click the Open Your Web-Office button.</value>
|
||||
</data>
|
||||
<data name="LearnMore" xml:space="preserve">
|
||||
<value>Learn more</value>
|
||||
</data>
|
||||
<data name="CompanyNamePlaceholder" xml:space="preserve">
|
||||
<value>Company name</value>
|
||||
</data>
|
||||
<data name="CompanySizePlaceholder" xml:space="preserve">
|
||||
<value>Company size</value>
|
||||
</data>
|
||||
<data name="EmailPlaceholder" xml:space="preserve">
|
||||
<value>Email</value>
|
||||
</data>
|
||||
<data name="EmployeesCount" xml:space="preserve">
|
||||
<value>{0} employees</value>
|
||||
</data>
|
||||
<data name="EmployeesMoreThanCount" xml:space="preserve">
|
||||
<value>More than {0} employees</value>
|
||||
</data>
|
||||
<data name="GetLicenseFile" xml:space="preserve">
|
||||
<value>Get trial License File</value>
|
||||
</data>
|
||||
<data name="LicenseFile" xml:space="preserve">
|
||||
<value>License File</value>
|
||||
</data>
|
||||
<data name="NamePlaceholder" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="PhonePlaceholder" xml:space="preserve">
|
||||
<value>Phone</value>
|
||||
</data>
|
||||
<data name="PositionPlaceholder" xml:space="preserve">
|
||||
<value>Position</value>
|
||||
</data>
|
||||
<data name="RequestForm" xml:space="preserve">
|
||||
<value>Request form</value>
|
||||
</data>
|
||||
<data name="TrialDescText" xml:space="preserve">
|
||||
<value>After the correct filling in of the request we automatically generate the license file for the trial version, which will be available to you within 30 days.</value>
|
||||
</data>
|
||||
<data name="TrialReadyText" xml:space="preserve">
|
||||
<value>Your license file has been successfully created and will be automatically inserted in the field.</value>
|
||||
</data>
|
||||
<data name="ConnectionSettingsFormDescText_Community" xml:space="preserve">
|
||||
<value>An ONLYOFFICE Installer used to automate the deployment process of ONLYOFFICE Community Edition using the Docker container technology. ONLYOFFICE Community Edition comprises online document editors, collaboration system and mail server, all to resolve the collaboration issues for both small and medium-sized teams.</value>
|
||||
</data>
|
||||
</root>
|
74
web/Resources/OneClickJsResource.Designer.cs
generated
@ -60,15 +60,6 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Email sended.
|
||||
/// </summary>
|
||||
public static string EmailSendedMsg {
|
||||
get {
|
||||
return ResourceManager.GetString("EmailSendedMsg", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Currently only supports 64bit OS's.
|
||||
/// </summary>
|
||||
@ -88,7 +79,7 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to The following ports must be open: 80, 443 (25 for Mail Server).
|
||||
/// Looks up a localized string similar to The required ports are closed.
|
||||
/// </summary>
|
||||
public static string ErrorInstallation3 {
|
||||
get {
|
||||
@ -132,6 +123,42 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to To perform this action you must be logged in with root rights.
|
||||
/// </summary>
|
||||
public static string ErrorInstallation8 {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorInstallation8", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cannot create trial license. Invalid input parameter..
|
||||
/// </summary>
|
||||
public static string ErrorInstallationExternal1 {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorInstallationExternal1", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cannot create trial license. An internal error is occured..
|
||||
/// </summary>
|
||||
public static string ErrorInstallationExternal2 {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorInstallationExternal2", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cannot create trial license. The hostname has been assigned to another email address..
|
||||
/// </summary>
|
||||
public static string ErrorInstallationExternal3 {
|
||||
get {
|
||||
return ResourceManager.GetString("ErrorInstallationExternal3", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid domain name.
|
||||
/// </summary>
|
||||
@ -168,15 +195,6 @@ namespace OneClickInstallation.Resources {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Reboot the server.
|
||||
/// </summary>
|
||||
public static string InstallationStepRebootMsg {
|
||||
get {
|
||||
return ResourceManager.GetString("InstallationStepRebootMsg", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Please wait....
|
||||
/// </summary>
|
||||
@ -185,23 +203,5 @@ namespace OneClickInstallation.Resources {
|
||||
return ResourceManager.GetString("LoaderMsg", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to I want to be notified about the release of a new product. My email: {0}.
|
||||
/// </summary>
|
||||
public static string NotyfyEmailBody {
|
||||
get {
|
||||
return ResourceManager.GetString("NotyfyEmailBody", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Control Panel Subscription.
|
||||
/// </summary>
|
||||
public static string NotyfyEmailSubject {
|
||||
get {
|
||||
return ResourceManager.GetString("NotyfyEmailSubject", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -117,9 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="EmailSendedMsg" xml:space="preserve">
|
||||
<value>Email sended</value>
|
||||
</data>
|
||||
<data name="ErrorInstallation1" xml:space="preserve">
|
||||
<value>Currently only supports 64bit OS's</value>
|
||||
</data>
|
||||
@ -127,7 +124,7 @@
|
||||
<value>Not supported OS</value>
|
||||
</data>
|
||||
<data name="ErrorInstallation3" xml:space="preserve">
|
||||
<value>The following ports must be open: 80, 443 (25 for Mail Server)</value>
|
||||
<value>The required ports are closed</value>
|
||||
</data>
|
||||
<data name="ErrorInstallation4" xml:space="preserve">
|
||||
<value>Please, set hostname for mail server</value>
|
||||
@ -141,6 +138,18 @@
|
||||
<data name="ErrorInstallation7" xml:space="preserve">
|
||||
<value>Kernel version not supported</value>
|
||||
</data>
|
||||
<data name="ErrorInstallation8" xml:space="preserve">
|
||||
<value>To perform this action you must be logged in with root rights</value>
|
||||
</data>
|
||||
<data name="ErrorInstallationExternal1" xml:space="preserve">
|
||||
<value>Cannot create trial license. Invalid input parameter.</value>
|
||||
</data>
|
||||
<data name="ErrorInstallationExternal2" xml:space="preserve">
|
||||
<value>Cannot create trial license. An internal error is occured.</value>
|
||||
</data>
|
||||
<data name="ErrorInstallationExternal3" xml:space="preserve">
|
||||
<value>Cannot create trial license. The hostname has been assigned to another email address.</value>
|
||||
</data>
|
||||
<data name="ErrorInvalidDomainName" xml:space="preserve">
|
||||
<value>Invalid domain name</value>
|
||||
</data>
|
||||
@ -153,16 +162,7 @@
|
||||
<data name="InstallationStepProcessMsg" xml:space="preserve">
|
||||
<value>In the process</value>
|
||||
</data>
|
||||
<data name="InstallationStepRebootMsg" xml:space="preserve">
|
||||
<value>Reboot the server</value>
|
||||
</data>
|
||||
<data name="LoaderMsg" xml:space="preserve">
|
||||
<value>Please wait...</value>
|
||||
</data>
|
||||
<data name="NotyfyEmailBody" xml:space="preserve">
|
||||
<value>I want to be notified about the release of a new product. My email: {0}</value>
|
||||
</data>
|
||||
<data name="NotyfyEmailSubject" xml:space="preserve">
|
||||
<value>Control Panel Subscription</value>
|
||||
</data>
|
||||
</root>
|
@ -156,8 +156,8 @@ var Common = (function () {
|
||||
|
||||
return {
|
||||
show: function (popupId, width, height, marginLeft, marginTop) {
|
||||
width = width || 362;
|
||||
height = height || 325;
|
||||
width = width || 460;
|
||||
height = height || 300;
|
||||
marginLeft = marginLeft || 0;
|
||||
marginTop = marginTop || 0;
|
||||
|
||||
@ -171,7 +171,79 @@ var Common = (function () {
|
||||
};
|
||||
}();
|
||||
|
||||
var getKeyCode = function(event) {
|
||||
var selectorListener = function () {
|
||||
|
||||
var $selectors = $('.custom-select');
|
||||
|
||||
var init = function () {
|
||||
$selectors.on('click', showSelectOptions);
|
||||
$selectors.on('click', '.custom-select-option', selectOption);
|
||||
|
||||
$selectors.on('focus', '.custom-select-value', function () { this.blur(); });
|
||||
|
||||
$("body").on("click", function (event) {
|
||||
var target = (event.target) ? event.target : event.srcElement,
|
||||
element = $(target);
|
||||
|
||||
if (!element.is('.custom-select') && !element.is('.custom-select-value') && !element.is('.custom-select-switch')) {
|
||||
$selectors.find('.custom-select-options').hide();
|
||||
} else {
|
||||
var curBox = element.is('.custom-select') ? element : element.parents('.custom-select:first');
|
||||
$selectors.not(curBox).find('.custom-select-options').hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
function showSelectOptions() {
|
||||
var $selector = $(this);
|
||||
var $options = $selector.find('.custom-select-options');
|
||||
|
||||
if ($options.is(':visible')) {
|
||||
$options.hide();
|
||||
$options.css('top', 0);
|
||||
$options.css('left', 0);
|
||||
} else {
|
||||
var offset = $selector.position();
|
||||
|
||||
if ($options.is('.top')) {
|
||||
$options.css('top', offset.top - $options.outerHeight() - 3 + 'px');
|
||||
$options.css('left', offset.left + $selector.outerWidth() - $options.outerWidth() + 'px');
|
||||
} else {
|
||||
$options.css('top', offset.top + $selector.outerHeight() + 3 + 'px');
|
||||
$options.css('left', offset.left + $selector.outerWidth() - $options.outerWidth() + 'px');
|
||||
}
|
||||
|
||||
$options.show();
|
||||
}
|
||||
}
|
||||
|
||||
function selectOption() {
|
||||
var $option = $(this);
|
||||
var $select = $option.closest('.custom-select');
|
||||
|
||||
$select.find('.custom-select-value').val($option.text());
|
||||
$select.attr('data-value', $option.attr('data-value'));
|
||||
|
||||
$option.closest('.custom-select-options').hide();
|
||||
$option.siblings('.custom-select-option').removeClass('selected');
|
||||
$option.addClass('selected');
|
||||
}
|
||||
|
||||
var set = function (select, value) {
|
||||
if (!select.is(".custom-select")) {
|
||||
return;
|
||||
}
|
||||
|
||||
select.find(".custom-select-option[data-value=\"" + value + "\"]").click();
|
||||
};
|
||||
|
||||
return {
|
||||
init: init,
|
||||
set: set,
|
||||
};
|
||||
}();
|
||||
|
||||
var getKeyCode = function (event) {
|
||||
var code = null;
|
||||
|
||||
if (event.keyCode)
|
||||
@ -182,10 +254,28 @@ var Common = (function () {
|
||||
return code;
|
||||
};
|
||||
|
||||
var getUrlParam = function (paramName) {
|
||||
var urlParams = {};
|
||||
|
||||
if (location.search) {
|
||||
var queryParts = location.search.substring(1).split("&");
|
||||
|
||||
for (var i = 0; i < queryParts.length; i++) {
|
||||
var keyValuePair = queryParts[i].split("=");
|
||||
if (!keyValuePair[0]) continue;
|
||||
urlParams[keyValuePair[0]] = keyValuePair[1];
|
||||
}
|
||||
}
|
||||
|
||||
return urlParams.hasOwnProperty(paramName) ? urlParams[paramName] : null;
|
||||
};
|
||||
|
||||
return {
|
||||
loader: loader,
|
||||
blockUI: blockUI,
|
||||
getKeyCode: getKeyCode
|
||||
selectorListener: selectorListener,
|
||||
getKeyCode: getKeyCode,
|
||||
getUrlParam: getUrlParam
|
||||
};
|
||||
|
||||
})($);
|
@ -16,18 +16,21 @@
|
||||
<div class="popup-caption">
|
||||
<div class="popup-error"></div>
|
||||
@OneClickHomePageResource.ConnectionErrorHdr
|
||||
<div class="popup-close">x</div>
|
||||
<div class="popup-close"></div>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<div class="bottom-indent">
|
||||
<div class="error-message"></div>
|
||||
<div class="default-message">
|
||||
@OneClickHomePageResource.ConnectionErrorText_1
|
||||
<br/>
|
||||
@OneClickHomePageResource.ConnectionErrorText_2
|
||||
<div>
|
||||
@OneClickHomePageResource.ConnectionErrorText_1<br/>
|
||||
@OneClickHomePageResource.ConnectionErrorText_2
|
||||
</div>
|
||||
<br>
|
||||
<a href="@Settings.HelpUrl" target="_blank" class="underline">@OneClickHomePageResource.LearnMore</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="button dark small okbtn">@OneClickCommonResource.Ok</a>
|
||||
<a class="button black okbtn">@OneClickCommonResource.Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -35,7 +38,7 @@
|
||||
<div class="popup-caption">
|
||||
<div class="popup-error"></div>
|
||||
@OneClickHomePageResource.InstallationErrorHdr
|
||||
<div class="popup-close">x</div>
|
||||
<div class="popup-close"></div>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<div class="bottom-indent">
|
||||
@ -43,9 +46,9 @@
|
||||
<div class="default-message">@OneClickHomePageResource.InstallationErrorText</div>
|
||||
<br>
|
||||
<span>@OneClickHomePageResource.ContactSupport </span>
|
||||
<a href="mailto:@Settings.SupportEmail" class="underline">@Settings.SupportEmail</a>
|
||||
<a href="@Settings.DevUrl" target="_blank" class="underline">@Settings.DevUrl</a>
|
||||
</div>
|
||||
<a class="button dark small okbtn">@OneClickCommonResource.Ok</a>
|
||||
<a class="button black okbtn">@OneClickCommonResource.Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -53,7 +56,7 @@
|
||||
<div class="popup-caption">
|
||||
<div class="popup-error"></div>
|
||||
@OneClickHomePageResource.ExistVersionErrorHdr
|
||||
<div class="popup-close">x</div>
|
||||
<div class="popup-close"></div>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<div class="bottom-indent">
|
||||
@ -64,30 +67,80 @@
|
||||
</div>
|
||||
<br>
|
||||
<span>@OneClickHomePageResource.ContactSupport </span>
|
||||
<a href="mailto:@Settings.SupportEmail" class="underline">@Settings.SupportEmail</a>
|
||||
<a href="@Settings.DevUrl" target="_blank" class="underline">@Settings.DevUrl</a>
|
||||
</div>
|
||||
</div>
|
||||
<a class="button dark small okbtn">@OneClickCommonResource.Ok</a>
|
||||
<a class="button black okbtn">@OneClickCommonResource.Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (ViewBag.Enterprise)
|
||||
{
|
||||
<div id="trialPop" class="popup">
|
||||
<div class="popup-caption">
|
||||
@OneClickHomePageResource.RequestForm
|
||||
<div class="popup-close"></div>
|
||||
</div>
|
||||
<div class="popup-body">
|
||||
<div class="disconnected" style="height: 480px;">
|
||||
<div class="bottom-indent label">
|
||||
@OneClickHomePageResource.TrialDescText
|
||||
</div>
|
||||
<div class="bottom-indent">
|
||||
<input id="name" type="text" class="group-top" placeholder="@OneClickHomePageResource.NamePlaceholder" />
|
||||
<input id="email" type="text" class="group-center" placeholder="@OneClickHomePageResource.EmailPlaceholder" />
|
||||
<input id="phone" type="text" class="group-center" placeholder="@OneClickHomePageResource.PhonePlaceholder" />
|
||||
<input id="companyName" type="text" class="group-center" placeholder="@OneClickHomePageResource.CompanyNamePlaceholder" />
|
||||
<div class="custom-select group-center">
|
||||
<input id="companySize" type="text" class="custom-select-value" placeholder="@OneClickHomePageResource.CompanySizePlaceholder" readonly="readonly"/>
|
||||
<div class="custom-select-switch"></div>
|
||||
<div class="custom-select-options">
|
||||
<div class="custom-select-options-inner">
|
||||
<div class="custom-select-option" data-value="5">@String.Format(OneClickHomePageResource.EmployeesCount, "1 - 5")</div>
|
||||
<div class="custom-select-option" data-value="14">@String.Format(OneClickHomePageResource.EmployeesCount, "6 - 14")</div>
|
||||
<div class="custom-select-option" data-value="64">@String.Format(OneClickHomePageResource.EmployeesCount, "15 - 64")</div>
|
||||
<div class="custom-select-option" data-value="350">@String.Format(OneClickHomePageResource.EmployeesCount, "65 - 350")</div>
|
||||
<div class="custom-select-option" data-value="1499">@String.Format(OneClickHomePageResource.EmployeesCount, "351 - 1499")</div>
|
||||
<div class="custom-select-option" data-value="1500">@String.Format(OneClickHomePageResource.EmployeesMoreThanCount, "1500")</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input id="position" type="text" class="group-bottom" placeholder="@OneClickHomePageResource.PositionPlaceholder" />
|
||||
</div>
|
||||
<a id="trialBtn" class="button black">@OneClickCommonResource.GetLicenseFile</a>
|
||||
</div>
|
||||
<div class="connected display-none" style="height: 480px;">
|
||||
<h1 class="blue bottom-indent">@OneClickHomePageResource.TrialReadyText</h1>
|
||||
<a class="button green okbtn">@OneClickCommonResource.Ok</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
@section scripts {
|
||||
|
||||
|
||||
@Scripts.Render("~/bundles/homepage")
|
||||
|
||||
|
||||
<script>
|
||||
$(function() {
|
||||
$(function () {
|
||||
|
||||
ActionUrl.UploadFile = '@Url.Action("UploadFile", "Home")';
|
||||
ActionUrl.Connect = '@Url.Action("Connect", "Home")';
|
||||
ActionUrl.StartInstall = '@Url.Action("StartInstall", "Home")';
|
||||
ActionUrl.InstallProgress = '@Url.Action("InstallProgress", "Home")';
|
||||
|
||||
SetupInfo.connectionSettings = JSON.parse(@Html.Raw(Json.Encode(ViewBag.ConnectionSettings)));
|
||||
SetupInfo.availableComponents = JSON.parse(@Html.Raw(Json.Encode(ViewBag.AvailableComponents)));
|
||||
SetupInfo.installedComponents = JSON.parse(@Html.Raw(Json.Encode(ViewBag.InstalledComponents)));
|
||||
SetupInfo.selectedComponents = JSON.parse(@Html.Raw(Json.Encode(ViewBag.SelectedComponents)));
|
||||
SetupInfo.installationProgress = JSON.parse(@Html.Raw(Json.Encode(ViewBag.InstallationProgress)));
|
||||
SetupInfo.osInfo = JSON.parse(@Html.Raw(Json.Encode(ViewBag.OsInfo)));
|
||||
SetupInfo.trialFileName = '@Settings.TrialFileName';
|
||||
SetupInfo.enterprise = Boolean(@(ViewBag.Enterprise ? 1 : 0));
|
||||
|
||||
InstallManager.init();
|
||||
|
||||
InstallManager.init('@Url.Action("UploadFile", "Home")',
|
||||
'@Url.Action("Connect", "Home")',
|
||||
'@Url.Action("StartInstall", "Home")',
|
||||
'@Url.Action("InstallProgress", "Home")',
|
||||
'@Url.Action("SendEmail", "Home")');
|
||||
});
|
||||
</script>
|
||||
}
|
@ -9,45 +9,58 @@
|
||||
|
||||
<p class="label">@OneClickHomePageResource.ConnectionSettingsFormText</p>
|
||||
|
||||
<div id="connectionFieldsForm">
|
||||
<div class="bottom-indent">
|
||||
<input id="host" type="text" class="group-top" placeholder="@OneClickHomePageResource.IPAddressPlaceholder" />
|
||||
<input id="userName" type="text" class="group-bottom" placeholder="@OneClickHomePageResource.UserNamePlaceholder" />
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent">
|
||||
<input id="host" type="text" class="group-top" placeholder="@OneClickHomePageResource.IPAddressPlaceholder" />
|
||||
<input id="userName" type="text" class="group-bottom" placeholder="@OneClickHomePageResource.UserNamePlaceholder" />
|
||||
<div class="bottom-indent-small">
|
||||
<div id="keyType" class="custom-radio checked" data-name="authType">
|
||||
<div class="icon"></div>
|
||||
<span class="label">@OneClickHomePageResource.SSHKey</span>
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent">
|
||||
<div id="keyType" class="custom-radio checked" data-name="authType">
|
||||
<div class="icon"></div>
|
||||
<span class="label">@OneClickHomePageResource.SSHKey</span>
|
||||
</div>
|
||||
<div id="passwordType" class="custom-radio" data-name="authType">
|
||||
<div class="icon"></div>
|
||||
<span class="label">@OneClickHomePageResource.Password</span>
|
||||
</div>
|
||||
<div id="passwordType" class="custom-radio" data-name="authType">
|
||||
<div class="icon"></div>
|
||||
<span class="label">@OneClickHomePageResource.Password</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent position-relative">
|
||||
<input id="sshKey" type="text" class="single" readonly="readonly" placeholder="@OneClickHomePageResource.SSHKeyPlaceholder" style="padding-right: 64px;"/>
|
||||
<div class="bottom-indent position-relative">
|
||||
<input id="sshKey" type="text" class="single" readonly="readonly" placeholder="@OneClickHomePageResource.SSHKeyPlaceholder" style="padding-right: 64px;"/>
|
||||
<div class="upload-container">
|
||||
<input type="file" name="file" id="sshFile">
|
||||
<a class="button black">+</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent display-none">
|
||||
<input id="password" type="password" class="single" placeholder="@OneClickHomePageResource.PasswordPlaceholder" />
|
||||
</div>
|
||||
|
||||
@if (ViewBag.Enterprise)
|
||||
{
|
||||
<div class="bottom-indent-small semibold">@OneClickHomePageResource.LicenseFile</div>
|
||||
|
||||
<div class="bottom-indent-small position-relative">
|
||||
<input id="licenseKey" type="text" class="single" readonly="readonly" placeholder="@OneClickHomePageResource.LicensePlaceholder" style="padding-right: 64px;"/>
|
||||
<div class="upload-container">
|
||||
<input type="file" name="file" id="sshFile">
|
||||
<input type="file" name="file" id="licenseFile">
|
||||
<a class="button black">+</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent display-none">
|
||||
<input id="password" type="password" class="single" placeholder="@OneClickHomePageResource.PasswordPlaceholder" />
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent">
|
||||
<a id="connectBtn" class="button green disabled">@OneClickCommonResource.Connect</a>
|
||||
</div>
|
||||
|
||||
<div id="termsBlock" class="bottom-indent gray describe">
|
||||
@OneClickHomePageResource.AcceptTermsText<br />
|
||||
<a class="blue underline" href="@Settings.TermsFileUrl" target="_blank">@OneClickHomePageResource.AcceptTermsLinkText</a>
|
||||
<a id="showTrialPop" class="blue underline label">@OneClickHomePageResource.GetLicenseFile</a>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="bottom-indent">
|
||||
<a id="connectBtn" class="button green disabled">@OneClickCommonResource.Connect</a>
|
||||
</div>
|
||||
|
||||
<div id="termsBlock" class="bottom-indent gray describe">
|
||||
@OneClickHomePageResource.AcceptTermsText<br />
|
||||
<a class="blue underline" href="@Settings.TermsFileUrl" target="_blank">@OneClickHomePageResource.AcceptTermsLinkText</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -68,24 +81,22 @@
|
||||
|
||||
<h2 class="blue">@OneClickHomePageResource.SetupFormHdr</h2>
|
||||
|
||||
<p id="setupInfoText" class="label">@OneClickHomePageResource.SetupFormText</p>
|
||||
|
||||
<div class="bottom-indent">
|
||||
<div id="installCommunityServerCbx" class="custom-checkbox checked disabled">
|
||||
<div id="installCommunityServerCbx" class="custom-checkbox">
|
||||
<div class="icon"></div>
|
||||
<span class="label">@OneClickHomePageResource.CommunityServer</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent">
|
||||
<div id="installDocumentServerCbx" class="custom-checkbox checked disabled">
|
||||
<div id="installDocumentServerCbx" class="custom-checkbox">
|
||||
<div class="icon"></div>
|
||||
<span class="label">@OneClickHomePageResource.DocumentServer</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent">
|
||||
<div id="installMailServerCbx" class="custom-checkbox checked">
|
||||
<div id="installMailServerCbx" class="custom-checkbox">
|
||||
<div class="icon"></div>
|
||||
<span class="label">@OneClickHomePageResource.MailServer</span>
|
||||
</div>
|
||||
@ -94,34 +105,23 @@
|
||||
<div class="bottom-indent">
|
||||
<input id="mailDomain" type="text" class="single" placeholder="@OneClickHomePageResource.MailDomainPlaceholder" />
|
||||
</div>
|
||||
|
||||
<p id="mailServerSetupDesc" class="label display-none">@OneClickHomePageResource.SetupMailServerDesc</p>
|
||||
|
||||
<p id="updadeSetupOptionsDesc" class="label display-none">@OneClickHomePageResource.UpdadeSetupOptionsDesc</p>
|
||||
|
||||
@if (ViewBag.Enterprise)
|
||||
{
|
||||
<div class="bottom-indent" style="margin-top: 42px;">
|
||||
<div id="installControlPanelCbx" class="custom-checkbox">
|
||||
<div class="icon"></div>
|
||||
<span class="label">@OneClickHomePageResource.ControlPanel</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div class="bottom-indent">
|
||||
<a id="installbtn" class="button green disabled">@OneClickCommonResource.Install</a>
|
||||
<a id="disconnectBtn1" class="button green disabled display-none">@OneClickCommonResource.Disconnect</a>
|
||||
<a id="installBtn" class="button green disabled">@OneClickCommonResource.Install</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="settingsForm" class="form display-none">
|
||||
|
||||
<h2 class="blue">@OneClickHomePageResource.ServerSettingsFormHdr</h2>
|
||||
|
||||
<p class="label">@OneClickHomePageResource.ServerSettingsFormText</p>
|
||||
|
||||
<div id="notificationFieldsForm">
|
||||
|
||||
<div class="bottom-indent">
|
||||
<input id="email" type="text" class="single" placeholder="@OneClickHomePageResource.EmailPlaceholder" />
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent">
|
||||
<a id="notifybtn" class="button green disabled">@OneClickCommonResource.Notify</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
@ -5,16 +5,22 @@
|
||||
<div class="disconnected display-none">
|
||||
|
||||
<h1 class="blue">@OneClickHomePageResource.ConnectionSettingsFormDescHdr</h1>
|
||||
|
||||
<p class="bottom-indent-big">@OneClickHomePageResource.ConnectionSettingsFormDescText</p>
|
||||
|
||||
@if (ViewBag.Enterprise)
|
||||
{
|
||||
<p class="bottom-indent-big">@OneClickHomePageResource.ConnectionSettingsFormDescText_Enterprise</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
<p class="bottom-indent-big">@OneClickHomePageResource.ConnectionSettingsFormDescText_Community</p>
|
||||
}
|
||||
|
||||
<div class="install-step-img bottom-indent"></div>
|
||||
|
||||
<div class="bottom-indent-big">
|
||||
<div class="bottom-indent-big clear-fix">
|
||||
<div class="install-step semibold">@OneClickHomePageResource.ConnectStepText</div>
|
||||
<div class="install-step semibold">@OneClickHomePageResource.InstallStepText</div>
|
||||
<div class="install-step semibold">@OneClickHomePageResource.CustomStepText</div>
|
||||
<p class="label">@OneClickHomePageResource.CustomStepTitleText</p>
|
||||
<div class="install-step semibold">@OneClickHomePageResource.UsingStepText</div>
|
||||
</div>
|
||||
|
||||
<div class="bottom-indent-big">
|
||||
@ -76,7 +82,7 @@
|
||||
<div class="description display-none">
|
||||
|
||||
<h1 class="blue">@OneClickHomePageResource.SetupFormDescHdr</h1>
|
||||
<p>@OneClickHomePageResource.CommunityServerText</p>
|
||||
<p>@OneClickHomePageResource.SetupFormDescText</p>
|
||||
|
||||
<h2 class="blue">@OneClickHomePageResource.CommunityServerHdr</h2>
|
||||
<p>@OneClickHomePageResource.CommunityServerText</p>
|
||||
@ -99,6 +105,12 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@if (ViewBag.Enterprise)
|
||||
{
|
||||
<h2 class="blue">@OneClickHomePageResource.ControlPanelHdr</h2>
|
||||
<p>@OneClickHomePageResource.ControlPanelText_Enterprise</p>
|
||||
}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="progress display-none">
|
||||
@ -138,6 +150,14 @@
|
||||
<div class="progress-desc label"></div>
|
||||
<div class="progress-icon"></div>
|
||||
</div>
|
||||
@if (ViewBag.Enterprise)
|
||||
{
|
||||
<div class="progress-row clear-fix" data-step="@((int) InstallationProgressStep.InstallControlPanel)">
|
||||
<div class="progress-title">@OneClickHomePageResource.InstallationProgressStep_InstallControlPanel</div>
|
||||
<div class="progress-desc label"></div>
|
||||
<div class="progress-icon"></div>
|
||||
</div>
|
||||
}
|
||||
<div class="progress-row clear-fix" data-step="@((int)InstallationProgressStep.InstallCommunityServer)">
|
||||
<div class="progress-title">@OneClickHomePageResource.InstallationProgressStep_InstallCommunityServer</div>
|
||||
<div class="progress-desc label"></div>
|
||||
@ -155,48 +175,17 @@
|
||||
</div>
|
||||
|
||||
<div id="settingsFormDesc" class="form-desc display-none">
|
||||
|
||||
<h1 class="blue">@OneClickHomePageResource.ServerSettingsFormDescHdr</h1>
|
||||
|
||||
<p>@OneClickHomePageResource.ServerSettingsFormDescText_1</p>
|
||||
|
||||
<p>@OneClickHomePageResource.ServerSettingsFormDescText_2</p>
|
||||
|
||||
<div class="bottom-indent-big">
|
||||
<a id="enterBtn" class="button green" href="#" target="_blank">
|
||||
@OneClickCommonResource.Enter
|
||||
<a id="enterOnlyofficeBtn" class="button green" href="#" target="_blank">
|
||||
@OneClickCommonResource.EnterOnlyoffice
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<h2 class="blue clear-fix">
|
||||
<span class="float-left">@OneClickHomePageResource.ContrrolPanelHdr</span>
|
||||
<span class="float-left coming-soon"></span>
|
||||
</h2>
|
||||
|
||||
<p>@OneClickHomePageResource.ContrrolPanelText</p>
|
||||
|
||||
<table class="bottom-indent" style="width: 100%">
|
||||
<tr>
|
||||
<td>
|
||||
<div class="cp-feature semibold">
|
||||
<div class="icon https"></div>
|
||||
@OneClickHomePageResource.ContrrolPanelFeatureHttps
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="cp-feature semibold">
|
||||
<div class="icon audit"></div>
|
||||
@OneClickHomePageResource.ContrrolPanelFeatureAudit
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="cp-feature semibold">
|
||||
<div class="icon backup"></div>
|
||||
@OneClickHomePageResource.ContrrolPanelFeatureBackup
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="cp-feature semibold">
|
||||
<div class="icon update"></div>
|
||||
@OneClickHomePageResource.ContrrolPanelFeatureUpdate
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
@ -1,7 +1,8 @@
|
||||
|
||||
@using OneClickInstallation.Resources
|
||||
|
||||
<div class="layout-content-wrapper clear-fix">
|
||||
<div class="copyright">
|
||||
@OneClickCommonResource.Copyright
|
||||
@String.Format(OneClickCommonResource.Copyright, DateTime.Now.Year)
|
||||
</div>
|
||||
|
||||
<div class="social-links clear-fix">
|
||||
|
@ -1,4 +1,5 @@
|
||||
|
||||
@using OneClickInstallation.Resources
|
||||
|
||||
@{
|
||||
var currentAction = ViewContext.RouteData.Values["action"].ToString().ToLower();
|
||||
var currentLang = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
|
||||
@ -32,6 +33,12 @@
|
||||
<a href="@Url.Action("Index")" class="white uppercase selected">
|
||||
@OneClickHomePageResource.Home
|
||||
</a>
|
||||
|
||||
<a href="@string.Format("http://helpcenter.onlyoffice.com/{0}server/docker/oneclickinstall/faq.aspx", String.Equals(currentLang, "en", StringComparison.OrdinalIgnoreCase) ? "" : currentLang + "/")"
|
||||
target="_blank" class="white uppercase">
|
||||
@OneClickHomePageResource.FAQ
|
||||
</a>
|
||||
|
||||
<a href="@string.Format("http://www.onlyoffice.com/{0}/about.aspx", currentLang)" target="_blank" class="white uppercase">
|
||||
@OneClickCommonResource.About
|
||||
</a>
|
||||
|
@ -26,9 +26,27 @@
|
||||
<add key="resources.from-db" value="false" />
|
||||
<add key="analyticsFileUrl" value="" />
|
||||
<add key="termsFileUrl" value="https://help.onlyoffice.com/products/files/doceditor.aspx?fileid=4404722&doc=L3ZQczhiWDYrTDNsQ0NFNXk5R1RlaWhySEdIcTk1YXI1YXh0dHhtSVd0bz0_IjQ0MDQ3MjIi0" />
|
||||
<add key="emailSender" value="smtp.email.test|587|sender@email.test|password|true" />
|
||||
<add key="supportEmail" value="server@onlyoffice.com" />
|
||||
<add key="sourceUrl" value="https://github.com/ONLYOFFICE/OneClickInstall" />
|
||||
<add key="devUrl" value="http://dev.onlyoffice.org" />
|
||||
<add key="helpUrl" value="http://helpcenter.onlyoffice.com/server/docker/community/troubleshooting.aspx#OneclickIssues_block" />
|
||||
<add key="licenseUrl" value="" />
|
||||
<add key="docker.community-container-name" value="onlyoffice-community-server" />
|
||||
<add key="docker.document-container-name" value="onlyoffice-document-server" />
|
||||
<add key="docker.mail-container-name" value="onlyoffice-mail-server" />
|
||||
<add key="docker.controlpanel-container-name" value="onlyoffice-control-panel" />
|
||||
<add key="docker.community-image-name" value="onlyoffice/communityserver" />
|
||||
<add key="docker.document-image-name" value="onlyoffice/documentserver" />
|
||||
<add key="docker.mail-image-name" value="onlyoffice/mailserver" />
|
||||
<add key="docker.controlpanel-image-name" value="onlyoffice/controlpanel" />
|
||||
<add key="docker.enterprise.community-image-name" value="onlyoffice4enterprise/communityserver-ee" />
|
||||
<add key="docker.enterprise.document-image-name" value="onlyoffice4enterprise/documentserver-ee" />
|
||||
<add key="docker.enterprise.mail-image-name" value="onlyoffice/mailserver" />
|
||||
<add key="docker.enterprise.controlpanel-image-name" value="onlyoffice4enterprise/controlpanel-ee" />
|
||||
<add key="dockerhub.loginUrl" value="https://hub.docker.com/v2/users/login/" />
|
||||
<add key="dockerhub.tagsUrlFormat" value="https://hub.docker.com/v2/repositories/{0}/tags/" />
|
||||
<add key="dockerhub.userName" value="" />
|
||||
<add key="dockerhub.password" value="" />
|
||||
<add key="cacheKey" value="clearcache" />
|
||||
</appSettings>
|
||||
<system.web>
|
||||
<customErrors mode="On" defaultRedirect="/">
|
||||
|