├── .gitignore
├── .nuget
├── NuGet.Config
├── NuGet.exe
├── NuGet.targets
└── packages.config
├── 3rd-Party.txt
├── LICENSE.txt
├── README.md
├── build
├── Build.bat
└── msbuild
│ ├── MSBuild.Community.Tasks.chm
│ ├── MSBuild.Community.Tasks.dll
│ ├── Microsoft.Web.Publishing.Tasks.dll
│ ├── Microsoft.Web.XmlTransform.dll
│ ├── SlowCheetah.Xdt.dll
│ ├── al.exe
│ └── build.proj
├── references
├── ASC.Common.dll
├── ASC.Core.Common.dll
├── ASC.Resource.Data.dll
└── FileConverterUtils2.dll
└── web
├── 404.htm
├── 500.htm
├── App_Start
├── BundleConfig.cs
├── LessTransform.cs
└── RouteConfig.cs
├── Classes
├── ImageTag.cs
├── InstallationManager.cs
└── OsInfo.cs
├── Content
├── action-menu.less
├── button.less
├── form.less
├── header.less
├── images
│ ├── combo_gray.png
│ ├── corner_top.gif
│ ├── flags.png
│ ├── loader.gif
│ ├── logo.png
│ ├── social.png
│ ├── sprite.png
│ ├── step.png
│ ├── toast_icon01.png
│ ├── toast_icon02.png
│ └── toast_icon03.png
├── lang-switcher.less
├── layout.less
├── link.less
├── list.less
├── paragraph.less
├── site.less
├── toastr.less
└── vars.less
├── Controllers
├── HomeController.cs
└── ResourceController.cs
├── Executables
├── assets
│ └── run-docker.sh
├── install.sh
├── restart.sh
├── run-community-server.sh
├── run-control-panel.sh
├── run-document-server.sh
├── run-mail-server.sh
└── tools
│ ├── check-bindings.sh
│ ├── check-ports.sh
│ ├── check-previous-version.sh
│ ├── get-available-version.sh
│ ├── get-os-info.sh
│ ├── login-docker.sh
│ ├── make-dir.sh
│ ├── make-network.sh
│ ├── pull-image.sh
│ └── remove-container.sh
├── Global.asax
├── Global.asax.cs
├── Helpers
├── CacheHelper.cs
├── CookieHelper.cs
├── FileHelper.cs
├── LangHelper.cs
├── Settings.cs
├── SshHelper.cs
└── TagHelper.cs
├── Models
├── ConnectionSettingsModel.cs
├── InstallationComponentsModel.cs
├── InstallationProgressModel.cs
└── RequestInfoModel.cs
├── OneClickInstallation.csproj
├── Properties
└── AssemblyInfo.cs
├── Resources
├── OneClickCommonResource.Designer.cs
├── OneClickCommonResource.resx
├── OneClickHomePageResource.Designer.cs
├── OneClickHomePageResource.resx
├── OneClickJsResource.Designer.cs
└── OneClickJsResource.resx
├── Scripts
├── common.js
├── install.js
├── jquery-1.8.2.js
├── jquery-1.8.2.min.js
├── jquery.blockUI.js
├── jquery.blockUI.min.js
├── toastr.js
└── toastr.min.js
├── Views
├── Home
│ ├── Index.cshtml
│ ├── _IndexLeftSidePartial.cshtml
│ ├── _IndexRightSidePartial.cshtml
│ └── _IndexSwitcherPartial.cshtml
├── Shared
│ ├── _FooterPartial.cshtml
│ ├── _HeaderPartial.cshtml
│ └── _Layout.cshtml
├── _ViewStart.cshtml
└── web.config
├── Web.config
└── favicon.ico
/.gitignore:
--------------------------------------------------------------------------------
1 | logs
2 |
3 | packages
4 |
5 |
6 | build/Build.log
7 |
8 |
9 | web/App_Data/
10 | web/bin/
11 | web/obj/
--------------------------------------------------------------------------------
/.nuget/NuGet.Config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/.nuget/NuGet.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/.nuget/NuGet.exe
--------------------------------------------------------------------------------
/.nuget/NuGet.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildProjectDirectory)\..\
5 |
6 |
7 | false
8 |
9 |
10 | false
11 |
12 |
13 | true
14 |
15 |
16 | false
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 | $([System.IO.Path]::Combine($(TrunkDir), ".nuget"))
26 | $([System.IO.Path]::Combine($(NuGetToolsPath), "packages.config"))
27 | $([System.IO.Path]::Combine($(NuGetToolsPath), "packages"))
28 |
29 |
30 |
31 |
32 | $(TrunkDir).nuget
33 | $(NuGetToolsPath)/packages.config
34 | $(NuGetToolsPath)/packages
35 |
36 |
37 |
38 |
39 | $(NuGetToolsPath)\NuGet.exe
40 | @(PackageSource)
41 |
42 | "$(NuGetExePath)"
43 | mono --runtime=v4.0.30319 "$(NuGetExePath)"
44 |
45 | -RequireConsent
46 | -NonInteractive
47 |
48 | "$(TrunkDir) "
49 | "$(TrunkDir)"
50 |
51 |
52 | $(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)" $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir $(PaddedSolutionDir)
53 | $(NuGetCommand) pack "$(ProjectPath)" -Properties "Configuration=$(Configuration);Platform=$(Platform)" $(NonInteractiveSwitch) -OutputDirectory "$(PackageOutputDir)" -symbols
54 |
55 |
56 |
57 | RestorePackages;
58 | $(BuildDependsOn);
59 |
60 |
61 |
62 |
63 | $(BuildDependsOn);
64 | BuildPackage;
65 |
66 |
67 |
68 |
69 |
70 |
71 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
93 |
95 |
96 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
128 |
129 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/.nuget/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/3rd-Party.txt:
--------------------------------------------------------------------------------
1 | ONLYOFFICE One Click Installation uses code from the following 3rd party projects.
2 |
3 |
4 | 1. MySql.Data - ADO.Net driver for MySQL. (http://dev.mysql.com/downloads/)
5 |
6 | License: GPL 2.0
7 |
8 |
9 | 2. log4net - log4net is a tool to help the programmer output log statements to a variety of output targets. (http://logging.apache.org/log4net/)
10 |
11 | License: Apache 2.0
12 |
13 |
14 | 3. dotless.Core - This is a project to port the hugely useful Less libary to the .NET world. It give variables, nested rules and operators to CSS. (http://lesscss.org/)
15 |
16 | License: Apache 2.0
17 |
18 |
19 | 4. Newtonsoft.Json - Json.NET is a popular high-performance JSON framework for .NET (http://www.newtonsoft.com/json)
20 |
21 | License: MIT
22 |
23 |
24 | 5. Renci.SshNet- This project was inspired by Sharp.SSH library which was ported from Java. This library is a complete rewrite using .NET, without any third party dependencies and to utilize the parallelism as much as possible to allow best performance you can get. (http://sshnet.codeplex.com/)
25 |
26 | License: BSD-UNSPECIFIED
27 |
28 |
29 | 6. WebGrease- Web Grease is a suite of tools for optimizing javascript, css files and images. (http://webgrease.codeplex.com/)
30 |
31 | License: MS-EULA
32 |
33 |
34 | 7. Microsoft.Web.Infrastructure - This package contains the Microsoft.Web.Infrastructure assembly that lets you dynamically register HTTP modules at run time. (http://www.asp.net/)
35 |
36 | License: MS-EULA
37 |
38 |
39 | 8. jQuery - Query is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. (http://jquery.com/)
40 |
41 | License: MIT
42 |
43 |
44 | 9. jQuery BlockUI Plugin - The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser. (http://malsup.com/jquery/block/)
45 |
46 | License: MIT, GPL
47 |
48 |
49 | 10. toastr - Simple javascript toast notifications. (https://github.com/CodeSeven/toastr)
50 |
51 | License: MIT
52 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## ONLYOFFICE One Click Installation Overview
2 |
3 | An ONLYOFFICE One Click Installation is used to automate the deployment process of ONLYOFFICE Community Edition using the Docker container technology.
4 | ONLYOFFICE Community Edition is an open source software that comprises Document Server, Community Server and Mail Server,
5 | all to resolve the collaboration issues for both small and medium-sized teams.
6 |
7 |
8 | ## How it works?
9 |
10 | ONLYOFFICE One Click Installation service connects to a remote Linux machine via SSH (https://www.nuget.org/packages/SSH.NET/ or https://github.com/sshnet/SSH.NET) using the following provided user data: username with admin access rights, password or SSH key and the server IP address or full domain name, uploads the scripts from the 'Executables' folder and runs them:
11 |
12 | The scripts are performing the following:
13 |
14 | 1. bash check-previous-version.sh
15 | checking the already existing data
16 |
17 | 2. bash make-dir.sh
18 | creating the working directory /app/onlyoffice
19 |
20 | 3. bash get-os-info.sh
21 | getting the information about the currently used OS
22 |
23 | 4. bash check-ports.sh "80,443,5222,25,143,587"
24 | checking ports of the current computer
25 |
26 | 5. bash run-docker.sh "Ubuntu" "14.04" "3.13.0-36-generic" "x86_64"
27 | installing and running Docker
28 |
29 | 6. bash make-network.sh
30 | creating docker network
31 |
32 | 7. bash run-document-server.sh
33 | installing Document Server
34 |
35 | 8. bash run-mail-server.sh -d "domainName"
36 | installing Mail Server using the specified domain name
37 |
38 | 8. bash run-community-server.sh
39 | installing Community Server
40 |
41 |
42 | Before running each script two commands need to be executed:
43 |
44 | chmod +x scriptPath
45 | sed -i 's/\r$//' scriptPath
46 |
47 | where scriptPath is the path to the script (e.g. /app/onlyoffice/setup/tools/check-ports.sh)
48 |
49 | This is used to correct the document formatting (\n\r issues in different operating systems)
50 |
51 |
52 | ## Project Information
53 |
54 | Official website: [http://one-click-install.onlyoffice.com](http://one-click-install.onlyoffice.com "http://one-click-install.onlyoffice.com")
55 |
56 | Code repository: [https://github.com/ONLYOFFICE/OneClickInstall](https://github.com/ONLYOFFICE/OneClickInstall "https://github.com/ONLYOFFICE/OneClickInstall")
57 |
58 | License: [Apache v.2.0](http://www.apache.org/licenses/LICENSE-2.0 "Apache v.2.0")
59 |
60 | ONLYOFFICE SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.onlyoffice.com")
61 |
62 | ONLYOFFICE Open Source version: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org")
63 |
64 |
65 | ## User Feedback and Support
66 |
67 | If you have any problems with or questions about ONLYOFFICE One Click Installation, please visit our official forum to find answers to your questions: [dev.onlyoffice.org][1] or you can ask and answer ONLYOFFICE development questions on [Stack Overflow][2].
68 |
69 | [1]: http://dev.onlyoffice.org
70 | [2]: http://stackoverflow.com/questions/tagged/onlyoffice
71 |
--------------------------------------------------------------------------------
/build/Build.bat:
--------------------------------------------------------------------------------
1 | %SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe msbuild\build.proj /fl1 /flp1:LogFile=Build.log;Verbosity=Normal
2 | pause
--------------------------------------------------------------------------------
/build/msbuild/MSBuild.Community.Tasks.chm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/build/msbuild/MSBuild.Community.Tasks.chm
--------------------------------------------------------------------------------
/build/msbuild/MSBuild.Community.Tasks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/build/msbuild/MSBuild.Community.Tasks.dll
--------------------------------------------------------------------------------
/build/msbuild/Microsoft.Web.Publishing.Tasks.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/build/msbuild/Microsoft.Web.Publishing.Tasks.dll
--------------------------------------------------------------------------------
/build/msbuild/Microsoft.Web.XmlTransform.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/build/msbuild/Microsoft.Web.XmlTransform.dll
--------------------------------------------------------------------------------
/build/msbuild/SlowCheetah.Xdt.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/build/msbuild/SlowCheetah.Xdt.dll
--------------------------------------------------------------------------------
/build/msbuild/al.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/build/msbuild/al.exe
--------------------------------------------------------------------------------
/build/msbuild/build.proj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ..\..\
7 | Debug
8 | Debug
9 | Build
10 |
11 |
12 |
13 | $(ASCDir).nuget\NuGet.exe
14 | mono $(ASCDir).nuget\NuGet.exe
15 | $(ASCDir).nuget\packages.config
16 | $(ASCDir).nuget\NuGet.Config
17 | $(NuGetCommand) install $(PackagesConfig) -ConfigFile $(NuGetConfig) -SolutionDirectory $(ASCDir) -OutputDirectory $(ASCDir)packages -NonInteractive -NoCache
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/references/ASC.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/references/ASC.Common.dll
--------------------------------------------------------------------------------
/references/ASC.Core.Common.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/references/ASC.Core.Common.dll
--------------------------------------------------------------------------------
/references/ASC.Resource.Data.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/references/ASC.Resource.Data.dll
--------------------------------------------------------------------------------
/references/FileConverterUtils2.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/references/FileConverterUtils2.dll
--------------------------------------------------------------------------------
/web/404.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ONLYOFFICE™ is on maintenance
7 |
24 |
25 |
26 |
27 |
28 |
29 |
Sorry, the resource
30 |
cannot be found.
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/web/500.htm:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ONLYOFFICE™ is on maintenance
7 |
24 |
25 |
26 |
27 |
28 |
29 |
Sorry, ONLYOFFICE™ is
30 |
on maintenance.
31 |
It may take a few minutes.
32 |
33 |
34 |
35 |
--------------------------------------------------------------------------------
/web/App_Start/BundleConfig.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System.Web.Optimization;
21 |
22 | namespace OneClickInstallation
23 | {
24 | public class BundleConfig
25 | {
26 | public static void RegisterBundles(BundleCollection bundles)
27 | {
28 | bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
29 | "~/Scripts/jquery-{version}.js",
30 | "~/Scripts/jquery.blockUI.js"));
31 |
32 | bundles.Add(new ScriptBundle("~/bundles/homepage").Include(
33 | "~/Scripts/common.js",
34 | "~/Scripts/toastr.js",
35 | "~/Scripts/install.js"));
36 |
37 | bundles.Add(new Bundle("~/Content/less", new LessTransform(), new CssMinify()).Include(
38 | "~/Content/vars.less",
39 | "~/Content/layout.less",
40 | "~/Content/header.less",
41 | "~/Content/paragraph.less",
42 | "~/Content/link.less",
43 | "~/Content/list.less",
44 | "~/Content/button.less",
45 | "~/Content/form.less",
46 | "~/Content/toastr.less",
47 | "~/Content/action-menu.less",
48 | "~/Content/lang-switcher.less",
49 | "~/Content/site.less"));
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/web/App_Start/LessTransform.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System.IO;
21 | using System.Web.Hosting;
22 | using System.Web.Optimization;
23 | using dotless.Core;
24 | using dotless.Core.Input;
25 | using dotless.Core.configuration;
26 |
27 | namespace OneClickInstallation
28 | {
29 | public class LessTransform : IBundleTransform
30 | {
31 | public void Process(BundleContext context, BundleResponse response)
32 | {
33 | var config = new DotlessConfiguration
34 | {
35 | MinifyOutput = true,
36 | ImportAllFilesAsLess = true,
37 | CacheEnabled = true,
38 | LessSource = typeof (VirtualFileReader)
39 | };
40 |
41 | response.Content = Less.Parse(response.Content, config);
42 | response.ContentType = "text/css";
43 | }
44 | }
45 |
46 | internal sealed class VirtualFileReader : IFileReader
47 | {
48 | public byte[] GetBinaryFileContents(string fileName)
49 | {
50 | fileName = GetFullPath(fileName);
51 | return File.ReadAllBytes(fileName);
52 | }
53 |
54 | public string GetFileContents(string fileName)
55 | {
56 | fileName = GetFullPath(fileName);
57 | return File.ReadAllText(fileName);
58 | }
59 |
60 | public bool DoesFileExist(string fileName)
61 | {
62 | fileName = GetFullPath(fileName);
63 | return File.Exists(fileName);
64 | }
65 |
66 | private static string GetFullPath(string path)
67 | {
68 | return HostingEnvironment.MapPath("~/Content/" + path);
69 | }
70 | }
71 | }
--------------------------------------------------------------------------------
/web/App_Start/RouteConfig.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System;
21 | using System.Web.Mvc;
22 | using System.Web.Routing;
23 | using OneClickInstallation.Helpers;
24 |
25 | namespace OneClickInstallation
26 | {
27 | public class RouteConfig
28 | {
29 | public static void RegisterRoutes(RouteCollection routes)
30 | {
31 | routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
32 |
33 | routes.MapRoute(
34 | "Localisation",
35 | "{lang}/{controller}/{action}/{id}",
36 | new { controller = "Home", action = "Index", id = UrlParameter.Optional },
37 | new { lang = String.Join("|", LangHelper.GetLanguages()) }
38 | );
39 |
40 | routes.MapRoute(
41 | "Default",
42 | "{controller}/{action}/{id}",
43 | new { controller = "Home", action = "Index", id = UrlParameter.Optional }
44 | );
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/web/Classes/ImageTag.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | namespace OneClickInstallation.Classes
21 | {
22 | public class ImageTag
23 | {
24 | public string Name { get; set; }
25 | }
26 | }
--------------------------------------------------------------------------------
/web/Classes/OsInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | namespace OneClickInstallation.Classes
21 | {
22 | public class OsInfo
23 | {
24 | public string Dist { get; set; }
25 | public string Ver { get; set; }
26 | public string Type { get; set; }
27 | public string Kernel { get; set; }
28 | }
29 | }
--------------------------------------------------------------------------------
/web/Content/action-menu.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | .action-menu {
23 | display: none;
24 | position: absolute;
25 | padding: 10px 20px 15px 15px;
26 | z-index: 999;
27 | background: #ffffff;
28 | border: 1px solid #d1d1d1;
29 | box-shadow: 1px 1px 8px #aaaaaa;
30 |
31 | .action {
32 | margin: 0 10px;
33 | height: 24px;
34 | line-height: 24px;
35 | white-space: nowrap;
36 | cursor: pointer;
37 | a {
38 | font-weight: normal;
39 | text-decoration: none;
40 | &:hover {
41 | text-decoration: underline;
42 | }
43 | }
44 | }
45 |
46 | .corner {
47 | background: url("images/corner_top.gif") no-repeat;
48 | width: 7px;
49 | height: 6px;
50 | position: absolute;
51 | top: -5px;
52 | right: 16px;
53 | }
54 | }
--------------------------------------------------------------------------------
/web/Content/button.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | .button, .button:visited, .button:active {
23 | cursor: pointer;
24 | padding: 0 20px;
25 | border: medium none;
26 | display: inline-block;
27 | font-size: 14px;
28 | font-weight: bold;
29 | text-decoration: none;
30 | text-transform: uppercase;
31 | height: 48px;
32 | line-height: 48px;
33 | .userSelect(none);
34 | .borderRadius(3px);
35 |
36 | &:hover {
37 | text-decoration: none;
38 | }
39 |
40 | &.disabled {
41 | cursor: default;
42 | pointer-events: none;
43 | }
44 |
45 | &.green {
46 | background: #66bb6a;
47 | color: #ffffff;
48 |
49 | &:hover {
50 | background: #78c27c;
51 | }
52 |
53 | &:active {
54 | background: #5baf5f;
55 | }
56 |
57 | &.disabled {
58 | background: #66bb6a;
59 | color: #b5dbb7;
60 | }
61 | }
62 |
63 | &.black {
64 | background: #4c4c4c;
65 | color: #ffffff;
66 |
67 | &:hover {
68 | background: #575757;
69 | }
70 |
71 | &:active {
72 | background: #444444;
73 | }
74 |
75 | &.disabled {
76 | background: #4c4c4c;
77 | color: #999999;
78 | }
79 | }
80 | }
--------------------------------------------------------------------------------
/web/Content/form.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | input[type="text"],
23 | input[type="password"]
24 | {
25 | border-color: #c1c1c1;
26 | border-width: 1px;
27 | border-style: solid;
28 | box-sizing: border-box;
29 | margin: 0;
30 | font-size: 16px;
31 | height: 54px;
32 | padding: 14px;
33 | width: 100%;
34 | .placeholder(#999999, 16px);
35 |
36 | &:focus
37 | {
38 | border-color: #62ade8 !important;
39 | }
40 |
41 | &.error
42 | {
43 | border-color: #bf3703 !important;
44 | }
45 |
46 | &.single
47 | {
48 | .borderRadius(3px);
49 | }
50 |
51 | &.group-top
52 | {
53 | border-bottom-color: #f3f3f3;
54 | .borderTopRadius(3px);
55 | }
56 |
57 | &.group-center
58 | {
59 | border-top-color: #f3f3f3;
60 | border-bottom-color: #f3f3f3;
61 | }
62 |
63 | &.group-bottom
64 | {
65 | border-top-color: #f3f3f3;
66 | .borderBottomRadius(3px);
67 | }
68 | }
69 |
70 | .upload-container {
71 | position: absolute;
72 | right: 0;
73 | top: 0;
74 |
75 | input[type="file"] {
76 | cursor: pointer;
77 | height: 100%;
78 | opacity: 0;
79 | position: absolute;
80 | width: 100%;
81 | }
82 |
83 | .button {
84 | font-size: 22px;
85 | font-weight: 600;
86 | height: 54px;
87 | line-height: 54px;
88 | }
89 |
90 | &:hover .button {
91 | background: #575757;
92 | }
93 |
94 | &:active .button {
95 | background: #444444;
96 | }
97 | }
98 |
99 | .custom-radio
100 | {
101 | display: inline-block;
102 | margin-right: 16px;
103 | cursor: pointer;
104 |
105 | .icon
106 | {
107 | background-image: url("images/sprite.png");
108 | background-position: -56px -135px;
109 | background-repeat: no-repeat;
110 | float: left;
111 | margin: 1px 8px 1px 0;
112 | height: 16px;
113 | width: 16px;
114 | }
115 |
116 | &.disabled
117 | {
118 | cursor: default;
119 |
120 | .icon
121 | {
122 | background-position: -82px -135px;
123 | }
124 |
125 | .label
126 | {
127 | color: #999999;
128 | }
129 | }
130 |
131 | &.checked
132 | {
133 | .icon
134 | {
135 | background-position: -4px -135px;
136 | }
137 |
138 | &.disabled
139 | {
140 | .icon
141 | {
142 | background-position: -30px -135px
143 | }
144 | }
145 | }
146 | }
147 |
148 | .custom-checkbox
149 | {
150 | display: inline-block;
151 | margin-right: 16px;
152 | cursor: pointer;
153 |
154 | .icon
155 | {
156 | float: left;
157 | margin: -2px 8px 0 0;
158 | height: 22px;
159 | width: 22px;
160 | background-image: url("images/sprite.png");
161 | background-position: -2px -28px;
162 | background-repeat: no-repeat;
163 | }
164 |
165 | &.disabled
166 | {
167 | cursor: default;
168 |
169 | .label
170 | {
171 | color: #999999;
172 | }
173 | }
174 |
175 | &.checked
176 | {
177 | .icon
178 | {
179 | background-position: -28px -28px;
180 | }
181 |
182 | &.disabled
183 | {
184 | .icon
185 | {
186 | background-position: -54px -28px;
187 | }
188 | }
189 |
190 | &.installed::after {
191 | background-color: #57ab5a;
192 | border-radius: 3px;
193 | color: #ffffff;
194 | content: "installed";
195 | font-size: 10px;
196 | margin-left: 8px;
197 | padding: 0 8px 1px;
198 | }
199 | }
200 | }
201 |
202 | .custom-select {
203 | border-color: #c1c1c1;
204 | border-width: 1px;
205 | border-style: solid;
206 | display: block;
207 | margin: 0;
208 | padding: 10px 14px;
209 | height: 26px;
210 | line-height: 26px;
211 | font-size: 16px;
212 | cursor: pointer;
213 |
214 | &.error {
215 | border-color: #bf3703;
216 | }
217 |
218 | &.disabled {
219 | background-color: #f4f4f4;
220 | }
221 |
222 | &.single
223 | {
224 | .borderRadius(3px);
225 | }
226 |
227 | &.group-top
228 | {
229 | border-bottom-color: #f3f3f3;
230 | .borderTopRadius(3px);
231 | }
232 |
233 | &.group-center
234 | {
235 | border-top-color: #f3f3f3;
236 | border-bottom-color: #f3f3f3;
237 | }
238 |
239 | &.group-bottom
240 | {
241 | border-top-color: #f3f3f3;
242 | .borderBottomRadius(3px);
243 | }
244 |
245 | .custom-select-value {
246 | border: medium none;
247 | height: 22px;
248 | width: 90%;
249 | padding: 0;
250 | }
251 |
252 | .custom-select-switch {
253 | float: right;
254 | width: 0;
255 | height: 0;
256 | margin-top: 11px;
257 | border-style: solid;
258 | border-width: 4px 4px 0 4px;
259 | border-color: #4c4c4c transparent transparent transparent;
260 | }
261 |
262 | .custom-select-options {
263 | display: none;
264 | position: absolute;
265 | padding: 5px;
266 | background-color: white;
267 | border: 1px solid #c1c1c1;
268 | .borderRadius(2px);
269 | .boxShadow(1px, 1px, 8px, rgba(0,0,0,.2));
270 | z-index: 1000;
271 |
272 | .custom-select-options-inner {
273 | max-height: 200px;
274 | padding-right: 20px;
275 | overflow-y: auto;
276 |
277 | .custom-select-option {
278 | display: block;
279 | text-decoration: none;
280 | padding: 2px 14px 2px 4px;
281 | min-width: 50px;
282 | color: #666666;
283 |
284 | &:hover {
285 | background-color: #e9e9e9;
286 | cursor: pointer;
287 | }
288 |
289 | &.selected {
290 | color: #2e94c9;
291 | }
292 | }
293 | }
294 | }
295 | }
296 |
--------------------------------------------------------------------------------
/web/Content/header.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | h1, h2, h3
23 | {
24 | padding: 0;
25 | margin: 0;
26 | }
27 |
28 | h1
29 | {
30 | font-size: 24px;
31 | font-weight: 100;
32 | margin-bottom: 24px;
33 | }
34 |
35 | h2
36 | {
37 | font-size: 18px;
38 | font-weight: 600;
39 | margin-bottom: 24px;
40 | }
41 |
42 | h3
43 | {
44 | font-size: 16px;
45 | font-weight: 100;
46 | margin-bottom: 24px;
47 | }
--------------------------------------------------------------------------------
/web/Content/images/combo_gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/combo_gray.png
--------------------------------------------------------------------------------
/web/Content/images/corner_top.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/corner_top.gif
--------------------------------------------------------------------------------
/web/Content/images/flags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/flags.png
--------------------------------------------------------------------------------
/web/Content/images/loader.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/loader.gif
--------------------------------------------------------------------------------
/web/Content/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/logo.png
--------------------------------------------------------------------------------
/web/Content/images/social.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/social.png
--------------------------------------------------------------------------------
/web/Content/images/sprite.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/sprite.png
--------------------------------------------------------------------------------
/web/Content/images/step.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/step.png
--------------------------------------------------------------------------------
/web/Content/images/toast_icon01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/toast_icon01.png
--------------------------------------------------------------------------------
/web/Content/images/toast_icon02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/toast_icon02.png
--------------------------------------------------------------------------------
/web/Content/images/toast_icon03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ONLYOFFICE/OneClickInstall/f2f60159ce58007debc68d1e9b408d3f1378cda3/web/Content/images/toast_icon03.png
--------------------------------------------------------------------------------
/web/Content/lang-switcher.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | .lang-switcher
23 | {
24 | display: inline-block;
25 | float: right;
26 | margin-top: 27px;
27 | position: relative;
28 |
29 | .switcher
30 | {
31 | padding-right: 15px;
32 | background: url("images/combo_gray.png") right center no-repeat;
33 | cursor: pointer;
34 |
35 | .lang-title
36 | {
37 | height: 16px;
38 | line-height: 16px;
39 |
40 | span
41 | {
42 | border-bottom: 1px dotted #ffffff;
43 | color: #ffffff;
44 | }
45 | }
46 | }
47 |
48 | a, .lang-title
49 | {
50 | background: url("images/flags.png") no-repeat;
51 | padding-left: 25px;
52 |
53 | &.en
54 | {
55 | background-position: left -14px;
56 | }
57 |
58 | &.de
59 | {
60 | background-position: left 2px;
61 | }
62 |
63 | &.fr
64 | {
65 | background-position: left -46px;
66 | }
67 |
68 | &.es
69 | {
70 | background-position: left -30px;
71 | }
72 |
73 | &.ru
74 | {
75 | background-position: left -94px;
76 | }
77 |
78 | &.lv
79 | {
80 | background-position: left -78px;
81 | }
82 |
83 | &.it
84 | {
85 | background-position: left -62px;
86 | }
87 | }
88 |
89 | .action-menu
90 | {
91 | right: -16px;
92 | top: 26px;
93 | }
94 | }
--------------------------------------------------------------------------------
/web/Content/layout.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | html, body
23 | {
24 | height: 100%;
25 | margin: 0;
26 | padding: 0;
27 | width: 100%;
28 | }
29 |
30 | body
31 | {
32 | background-color: #ffffff;
33 | color: #666666;
34 | font-size: 13px;
35 | font-family: "Open Sans", sans-serif, Arial;
36 | }
37 |
38 | .layout-wrapper
39 | {
40 | margin: 0;
41 | min-height: 100%;
42 | min-width: 960px;
43 | padding: 0;
44 | position: relative;
45 | width: 100%;
46 | }
47 |
48 | .layout-header
49 | {
50 | background-color: #3d4a6b;
51 | height: 72px;
52 | margin: 0;
53 | padding: 0;
54 | width: 100%;
55 | }
56 |
57 | .layout-body
58 | {
59 | padding: 0 0 112px;
60 |
61 | .layout-left-side
62 | {
63 | float: left;
64 | margin: 0;
65 | width: 280px;
66 | }
67 |
68 | .layout-right-side
69 | {
70 | float: right;
71 | margin: 62px 0 0;
72 | width: 620px;
73 | }
74 | }
75 |
76 | .layout-footer
77 | {
78 | bottom: 0;
79 | height: 72px;
80 | left: 0;
81 | margin: 0;
82 | padding: 0;
83 | position: absolute;
84 | width: 100%;
85 |
86 | .layout-content-wrapper
87 | {
88 | border-top: 1px solid #e0e0e0;
89 | }
90 | }
91 |
92 | .layout-content-wrapper
93 | {
94 | margin: 0 auto;
95 | width: 960px;
96 | }
--------------------------------------------------------------------------------
/web/Content/link.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | a
23 | {
24 | color: #333333;
25 | cursor: pointer;
26 | text-decoration: none;
27 |
28 | &:hover
29 | {
30 | text-decoration: underline;
31 | }
32 |
33 | &.selected
34 | {
35 | font-weight: bold;
36 | }
37 |
38 | &.underline
39 | {
40 | text-decoration: underline;
41 |
42 | &:hover
43 | {
44 | text-decoration: none;
45 | }
46 | }
47 |
48 | &.noline
49 | {
50 | text-decoration: none;
51 |
52 | &:hover
53 | {
54 | text-decoration: none;
55 | }
56 | }
57 |
58 | &.dotted
59 | {
60 | text-decoration: none;
61 | border-bottom: 1px dotted;
62 |
63 | &:hover
64 | {
65 | text-decoration: none;
66 | border-bottom: medium none;
67 | }
68 | }
69 | }
--------------------------------------------------------------------------------
/web/Content/list.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | ul
23 | {
24 | margin: 0;
25 | padding: 0;
26 | }
27 |
28 | li {
29 | margin: 0;
30 | padding: 0;
31 | list-style: none;
32 | }
33 |
34 | ul.square-style-list {
35 | margin: 0 0 0 48px;
36 |
37 | li {
38 | color: #de673c;
39 | line-height: 24px;
40 | list-style-type: square;
41 |
42 | span {
43 | color: #333333;
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/web/Content/paragraph.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | p
23 | {
24 | padding: 0;
25 | margin: 24px 0;
26 | }
--------------------------------------------------------------------------------
/web/Content/toastr.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | @import "vars";
21 |
22 | .toast-title {
23 | font-weight: bold;
24 | }
25 |
26 | .toast-message {
27 | -ms-word-wrap: break-word;
28 | word-wrap: break-word;
29 | }
30 |
31 | .toast-message a,
32 | .toast-message label {
33 | color: #000;
34 | }
35 |
36 | .toast-message a:hover {
37 | text-decoration: underline;
38 | }
39 |
40 | .toast-top-full-width {
41 | top: 0;
42 | right: 0;
43 | width: 100%;
44 | }
45 |
46 | .toast-bottom-full-width {
47 | bottom: 0;
48 | right: 0;
49 | width: 100%;
50 | }
51 |
52 | .toast-top-left {
53 | top: 12px;
54 | left: 12px;
55 | }
56 |
57 | .toast-top-right {
58 | right: 12px;
59 | top: 75px;
60 | }
61 |
62 | .toast-bottom-right {
63 | right: 12px;
64 | bottom: 12px;
65 | }
66 |
67 | .toast-bottom-left {
68 | bottom: 12px;
69 | left: 12px;
70 | }
71 |
72 | #toast-container {
73 | position: fixed;
74 | z-index: 999999;
75 | }
76 | .toast-container {
77 | width: 100%;
78 | }
79 | #toast-container > div,
80 | .toast-container > div,
81 | .toast-popup-container > div {
82 | background-position: 15px center;
83 | background-repeat: no-repeat;
84 | .borderRadius(3px);
85 | color: #000;
86 | margin: 0 0 6px;
87 | padding: 15px 15px 15px 50px;
88 | }
89 | #toast-container > div,
90 | .toast-popup-container > div {
91 | width: 300px;
92 | }
93 |
94 | .toast {
95 | background-color: #030303;
96 | }
97 |
98 | .toast-success {
99 | background-color: #cae796;
100 | }
101 |
102 | .toast-error {
103 | background-color: #ffbfaa;
104 | }
105 |
106 | .toast-info {
107 | background-color: #f1da92;
108 | }
109 |
110 | .toast-warning {
111 | background-color: #F89406;
112 | }
113 |
114 | #toast-container .toast-success:hover {
115 | background-color: #bcdf7e;
116 | }
117 |
118 | #toast-container .toast-error:hover {
119 | background-color: #ffa98d;
120 | }
121 |
122 | #toast-container .toast-info:hover {
123 | background-color: #eed27b;
124 | }
125 |
126 | #toast-container > :hover {
127 | .boxShadow(1px, 2px, 4px, #D1D1D1);
128 | cursor: pointer;
129 | }
130 |
131 | #toast-container > .toast-info,
132 | .toast-container > .toast-info,
133 | .toast-popup-container > .toast-info {
134 | background-image: url("images/toast_icon03.png");
135 | }
136 |
137 | #toast-container > .toast-error,
138 | .toast-container > .toast-error,
139 | .toast-popup-container > .toast-error {
140 | background-image: url("images/toast_icon01.png");
141 | }
142 |
143 | #toast-container > .toast-success,
144 | .toast-container > .toast-success,
145 | .toast-popup-container > .toast-success {
146 | background-image: url("images/toast_icon02.png");
147 | }
148 |
149 | #toast-container > .toast-warning,
150 | .toast-container > .toast-warning,
151 | .toast-popup-container > .toast-warning {
152 | background-image: url("images/toast_icon01.png");
153 | }
154 |
155 | /*Popup Toasts*/
156 |
157 | .toast-popup-container .toast {
158 | width: auto;
159 | padding: 14px 0 14px 40px;
160 | background-position: 8px center;
161 | .borderRadius(0);
162 | margin-top:6px;
163 | }
164 |
165 | .toast-popup-container .toast .toast-message {
166 | color: #333;
167 | }
168 |
169 | /*Responsive Design*/
170 |
171 | @media all and (max-width: 240px) {
172 | #toast-container > div {
173 | padding: 8px 8px 8px 50px;
174 | width: 108px;
175 | }
176 | }
177 |
178 | @media all and (min-width: 241px) and (max-width: 320px) {
179 | #toast-container > div {
180 | padding: 8px 8px 8px 50px;
181 | width: 128px;
182 | }
183 | }
184 |
185 | @media all and (min-width: 321px) and (max-width: 480px) {
186 | #toast-container > div {
187 | padding: 8px 8px 8px 50px;
188 | width: 192px;
189 | }
190 | }
191 |
192 | @media all and (min-width: 481px) and (max-width: 768px) {
193 | #toast-container > div {
194 | padding: 15px 15px 15px 50px;
195 | width: 300px;
196 | }
197 | }
198 |
199 | /* overrides */
200 | #toast-container.toast-top-full-width > div,
201 | #toast-container.toast-bottom-full-width > div {
202 | width: 100%;
203 | margin: 1px 0 1px 0;
204 | }
--------------------------------------------------------------------------------
/web/Content/vars.less:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | .borderRadius(@size: 5px)
21 | {
22 | border-radius: @size;
23 | }
24 |
25 | .borderTopRadius(@radius: 5px) {
26 | border-top-right-radius: @radius;
27 | border-top-left-radius: @radius;
28 | }
29 |
30 | .borderBottomRadius(@radius: 5px) {
31 | border-bottom-right-radius: @radius;
32 | border-bottom-left-radius: @radius;
33 | }
34 |
35 | .boxShadow(@hShadow: 1px, @vShadow: 1px, @spread: 8px, @color: #aaaaaa)
36 | {
37 | -webkit-box-shadow: @hShadow @vShadow @spread @color;
38 | -moz-box-shadow: @hShadow @vShadow @spread @color;
39 | box-shadow: @hShadow @vShadow @spread @color;
40 | }
41 |
42 | .backgroundLinearGradient(@topColor, @bottomColor)
43 | {
44 | background: -webkit-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
45 | background: -webkit-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
46 | background: -moz-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
47 | background: -ms-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
48 | background: -o-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
49 | background: linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
50 | filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=@topColor, endColorstr=@bottomColor);
51 | }
52 |
53 | .textOverflow(@width)
54 | {
55 | text-overflow: ellipsis;
56 | overflow: hidden;
57 | white-space: nowrap;
58 | width: @width;
59 | }
60 |
61 | .userSelect(@userSelect)
62 | {
63 | -webkit-touch-callout: @userSelect;
64 | -webkit-user-select: @userSelect;
65 | -khtml-user-select: @userSelect;
66 | -moz-user-select: @userSelect;
67 | -ms-user-select: @userSelect;
68 | user-select: @userSelect;
69 | }
70 |
71 | .placeholder(@color, @fontSize)
72 | {
73 | &::-webkit-input-placeholder
74 | {
75 | color: @color;
76 | font-size: @fontSize;
77 | }
78 |
79 | &::-moz-placeholder
80 | {
81 | color: @color;
82 | font-size: @fontSize;
83 | }
84 |
85 | &:-moz-placeholder
86 | {
87 | color: @color;
88 | font-size: @fontSize;
89 | }
90 |
91 | &:-ms-input-placeholder
92 | {
93 | color: @color;
94 | font-size: @fontSize;
95 | }
96 | }
--------------------------------------------------------------------------------
/web/Controllers/ResourceController.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System;
21 | using System.Collections;
22 | using System.Collections.Generic;
23 | using System.Globalization;
24 | using System.Resources;
25 | using System.Text;
26 | using System.Web.Mvc;
27 | using Newtonsoft.Json;
28 | using OneClickInstallation.Helpers;
29 | using OneClickInstallation.Resources;
30 |
31 | namespace OneClickInstallation.Controllers
32 | {
33 | public class ResourceController : Controller
34 | {
35 |
36 | public ActionResult Index(string culture)
37 | {
38 | if (string.IsNullOrWhiteSpace(culture))
39 | {
40 | culture = System.Threading.Thread.CurrentThread.CurrentCulture.TwoLetterISOLanguageName;
41 | }
42 |
43 | if (!ClientCacheEmpty()) return NotModifiedResponse();
44 |
45 | var cachedScript = CacheHelper.GetJsResuorce(culture);
46 |
47 | if (cachedScript != null) return ScriptResponse(cachedScript);
48 |
49 | var resources = new List>
50 | {
51 | new Tuple(OneClickJsResource.ResourceManager, typeof (OneClickJsResource).Name)
52 | };
53 |
54 | var script = CreateResourcesScript(resources, culture);
55 |
56 | CacheHelper.SetJsResuorce(culture, script);
57 |
58 | return ScriptResponse(script);
59 | }
60 |
61 |
62 | private bool ClientCacheEmpty()
63 | {
64 | return (Request.Headers["If-Modified-Since"] == null);
65 | }
66 |
67 | private ContentResult NotModifiedResponse()
68 | {
69 | Response.StatusCode = 304;
70 | Response.StatusDescription = "Not Modified";
71 | return Content(string.Empty);
72 | }
73 |
74 | private JavaScriptResult ScriptResponse(string script)
75 | {
76 | Response.Cache.SetLastModified(DateTime.UtcNow);
77 | return new JavaScriptResult { Script = script };
78 | }
79 |
80 | private static string CreateResourcesScript(IEnumerable> resources, string culture)
81 | {
82 | var script = string.Empty;
83 | foreach (var pair in resources)
84 | {
85 | var baseSet = pair.Item1.GetResourceSet(CultureInfo.InvariantCulture, true, true);
86 | var js = new StringBuilder(pair.Item2 + "={");
87 | foreach (DictionaryEntry entry in baseSet)
88 | {
89 | var key = (string)entry.Key;
90 | var value = pair.Item1.GetString(key, new CultureInfo(culture)) ?? string.Empty;
91 | js.AppendFormat("\"{0}\":{1},", entry.Key, JsonConvert.SerializeObject(value));
92 | }
93 |
94 | script += js.ToString();
95 | if (!string.IsNullOrEmpty(script))
96 | {
97 | script = script.Remove(script.Length - 1);
98 | }
99 | script += "};";
100 | }
101 |
102 | return script;
103 | }
104 | }
105 | }
--------------------------------------------------------------------------------
/web/Executables/assets/run-docker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | DIST=${1}
15 | REV=${2}
16 | KERNEL=${3}
17 | ARCH_TYPE=${4}
18 |
19 |
20 |
21 | check_os_info () {
22 | if [[ -z ${DIST} || -z ${REV} || -z ${KERNEL} || -z ${ARCH_TYPE} ]]; then
23 | echo "Not supported OS"
24 | echo "INSTALLATION-STOP-ERROR[2]"
25 | exit 0;
26 | fi
27 |
28 | if [ "${ARCH_TYPE}" != "x86_64" ]; then
29 | echo "Currently only supports 64bit OS's";
30 | echo "INSTALLATION-STOP-ERROR[1]"
31 | exit 0;
32 | fi
33 | }
34 |
35 | check_kernel () {
36 | MIN_NUM_ARR=(3 10 0);
37 | CUR_NUM_ARR=();
38 |
39 | CUR_STR_ARR=$(echo $KERNEL | grep -Po "[0-9]+\.[0-9]+\.[0-9]+" | tr "." " ");
40 | for CUR_STR_ITEM in $CUR_STR_ARR
41 | do
42 | CUR_NUM_ARR=(${CUR_NUM_ARR[@]} $CUR_STR_ITEM)
43 | done
44 |
45 | INDEX=0;
46 |
47 | while [[ $INDEX -lt 3 ]]; do
48 | if [ ${CUR_NUM_ARR[INDEX]} -lt ${MIN_NUM_ARR[INDEX]} ]; then
49 | echo "Not supported OS Kernel"
50 | echo "INSTALLATION-STOP-ERROR[7]"
51 | exit 0;
52 | elif [ ${CUR_NUM_ARR[INDEX]} -gt ${MIN_NUM_ARR[INDEX]} ]; then
53 | INDEX=3
54 | fi
55 | (( INDEX++ ))
56 | done
57 | }
58 |
59 | command_exists () {
60 | type "$1" &> /dev/null;
61 | }
62 |
63 | check_docker_version () {
64 | MIN_NUM_ARR=(1 10 0);
65 | CUR_NUM_ARR=();
66 |
67 | CUR_STR_ARR=$(docker -v | grep -Po "[0-9]+\.[0-9]+\.[0-9]+" | tr "." " ");
68 | for CUR_STR_ITEM in $CUR_STR_ARR
69 | do
70 | CUR_NUM_ARR=(${CUR_NUM_ARR[@]} $CUR_STR_ITEM)
71 | done
72 |
73 | NEED_UPDATE="false"
74 | INDEX=0;
75 |
76 | while [[ $INDEX -lt 3 ]]; do
77 | if [ ${CUR_NUM_ARR[INDEX]} -lt ${MIN_NUM_ARR[INDEX]} ]; then
78 | NEED_UPDATE="true"
79 | INDEX=3
80 | elif [ ${CUR_NUM_ARR[INDEX]} -gt ${MIN_NUM_ARR[INDEX]} ]; then
81 | INDEX=3
82 | fi
83 | (( INDEX++ ))
84 | done
85 |
86 | echo "$NEED_UPDATE"
87 | }
88 |
89 | uninstall_docker () {
90 |
91 | if [ "${DIST}" == "Ubuntu" ] || [ "${DIST}" == "Debian" ]; then
92 |
93 | sudo apt-get -y autoremove --purge docker-engine
94 |
95 | elif [[ "${DIST}" == CentOS* ]] || [ "${DIST}" == "Red Hat Enterprise Linux Server" ]; then
96 |
97 | sudo yum -y remove docker-engine.x86_64
98 |
99 | elif [ "${DIST}" == "SuSe" ]; then
100 |
101 | sudo zypper rm -y docker
102 |
103 | elif [ "${DIST}" == "Fedora" ]; then
104 |
105 | sudo dnf -y remove docker-engine.x86_64
106 |
107 | else
108 | echo "Not supported OS"
109 | echo "INSTALLATION-STOP-ERROR[2]"
110 | exit 0;
111 | fi
112 | }
113 |
114 | install_docker () {
115 |
116 | if [ "${DIST}" == "Ubuntu" ] || [ "${DIST}" == "Debian" ]; then
117 |
118 | sudo apt-get -y update
119 | sudo apt-get -y upgrade
120 | sudo apt-get -y -q install curl
121 | sudo curl -sSL https://get.docker.com/ | sh
122 |
123 | elif [[ "${DIST}" == CentOS* ]] || [ "${DIST}" == "Red Hat Enterprise Linux Server" ]; then
124 |
125 | sudo yum -y update
126 | sudo yum -y upgrade
127 | sudo yum -y install curl
128 | sudo curl -fsSL https://get.docker.com/ | sh
129 | sudo service docker start
130 |
131 | elif [ "${DIST}" == "SuSe" ]; then
132 |
133 | sudo zypper in -y docker
134 | sudo systemctl start docker
135 | sudo systemctl enable docker
136 |
137 | elif [ "${DIST}" == "Fedora" ]; then
138 |
139 | sudo dnf -y update
140 | sudo yum -y update
141 | sudo yum -y upgrade
142 | sudo yum -y install curl
143 | sudo curl -fsSL https://get.docker.com/ | sh
144 | sudo systemctl start docker
145 | sudo systemctl enable docker
146 |
147 | else
148 | echo "Not supported OS"
149 | echo "INSTALLATION-STOP-ERROR[2]"
150 | exit 0;
151 | fi
152 |
153 | if ! command_exists docker ; then
154 | echo "Error while installing docker"
155 | echo "INSTALLATION-STOP-ERROR[6]"
156 | exit 0;
157 | fi
158 |
159 | echo "Docker successfully installed"
160 | echo "INSTALLATION-STOP-SUCCESS"
161 | exit 0;
162 | }
163 |
164 |
165 |
166 | check_os_info
167 |
168 | check_kernel
169 |
170 | if command_exists docker ; then
171 | NEED_UPDATE=$(check_docker_version);
172 |
173 | if [ "$NEED_UPDATE" == "true" ]; then
174 | uninstall_docker
175 | install_docker
176 | else
177 | echo "Docker successfully installed"
178 | echo "INSTALLATION-STOP-SUCCESS"
179 | exit 0;
180 | fi
181 | else
182 | install_docker
183 | fi
184 |
--------------------------------------------------------------------------------
/web/Executables/restart.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | COMMUNITY_CONTAINER_NAME="onlyoffice-community-server";
15 | DOCUMENT_CONTAINER_NAME="onlyoffice-document-server";
16 | MAIL_CONTAINER_NAME="onlyoffice-mail-server";
17 | CONTROLPANEL_CONTAINER_NAME="onlyoffice-control-panel";
18 | FAST="false"
19 |
20 | while [ "$1" != "" ]; do
21 | case $1 in
22 |
23 | -cc | --communitycontainer )
24 | if [ "$2" != "" ]; then
25 | COMMUNITY_CONTAINER_NAME=$2
26 | shift
27 | fi
28 | ;;
29 |
30 | -dc | --documentcontainer )
31 | if [ "$2" != "" ]; then
32 | DOCUMENT_CONTAINER_NAME=$2
33 | shift
34 | fi
35 | ;;
36 |
37 | -mc | --mailcontainer )
38 | if [ "$2" != "" ]; then
39 | MAIL_CONTAINER_NAME=$2
40 | shift
41 | fi
42 | ;;
43 |
44 | -cpc | --controlpanelcontainer )
45 | if [ "$2" != "" ]; then
46 | CONTROLPANEL_CONTAINER_NAME=$2
47 | shift
48 | fi
49 | ;;
50 |
51 | -f | --fast )
52 | if [ "$2" != "" ]; then
53 | FAST=$2
54 | shift
55 | fi
56 | ;;
57 |
58 | -? | -h | --help )
59 | echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
60 | echo " Parameters:"
61 | echo " -cc, --communitycontainer community container name"
62 | echo " -dc, --documentcontainer document container name"
63 | echo " -mc, --mailcontainer mail container name"
64 | echo " -cpc, --controlpanelcontainer control panel container name"
65 | echo " -f, --fast fast restart services in community container"
66 | echo " -?, -h, --help this help"
67 | echo
68 | exit 0
69 | ;;
70 |
71 | * )
72 | echo "Unknown parameter $1" 1>&2
73 | exit 0
74 | ;;
75 | esac
76 | shift
77 | done
78 |
79 |
80 |
81 | root_checking () {
82 | if [ ! $( id -u ) -eq 0 ]; then
83 | echo "To perform this action you must be logged in with root rights"
84 | exit 0;
85 | fi
86 | }
87 |
88 | command_exists () {
89 | type "$1" &> /dev/null;
90 | }
91 |
92 | install_sudo () {
93 | if command_exists apt-get; then
94 | apt-get install sudo
95 | elif command_exists yum; then
96 | yum install sudo
97 | fi
98 |
99 | if ! command_exists sudo; then
100 | echo "command sudo not found"
101 | exit 0;
102 | fi
103 | }
104 |
105 | fast_restart () {
106 | COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
107 |
108 | if [[ -n ${COMMUNITY_SERVER_ID} ]]; then
109 | sudo docker exec ${COMMUNITY_CONTAINER_NAME} service monoserve restart;
110 | sudo docker exec ${COMMUNITY_CONTAINER_NAME} service monoserve2 restart;
111 | sudo docker exec ${COMMUNITY_CONTAINER_NAME} service nginx restart;
112 | else
113 | echo "COMMUNITY SERVER not found"
114 | fi
115 | }
116 |
117 | restart_document_server () {
118 | DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
119 |
120 | if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
121 | if [[ -z "$1" ]]; then
122 | sudo docker restart ${DOCUMENT_SERVER_ID};
123 | else
124 | sudo docker $1 ${DOCUMENT_SERVER_ID};
125 | fi
126 | else
127 | echo "DOCUMENT SERVER not found"
128 | fi
129 | }
130 |
131 | restart_mail_server () {
132 | MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
133 |
134 | if [[ -n ${MAIL_SERVER_ID} ]]; then
135 | if [[ -z "$1" ]]; then
136 | sudo docker restart ${MAIL_SERVER_ID};
137 | else
138 | sudo docker $1 ${MAIL_SERVER_ID};
139 | fi
140 | else
141 | echo "MAIL SERVER not found"
142 | fi
143 | }
144 |
145 | restart_controlpanel () {
146 | CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
147 |
148 | if [[ -n ${CONTROL_PANEL_ID} ]]; then
149 | if [[ -z "$1" ]]; then
150 | sudo docker restart ${CONTROL_PANEL_ID};
151 | else
152 | sudo docker $1 ${CONTROL_PANEL_ID};
153 | fi
154 | else
155 | echo "CONTROL PANEL not found"
156 | fi
157 | }
158 |
159 | restart_community_server () {
160 | COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
161 |
162 | if [[ -n ${COMMUNITY_SERVER_ID} ]]; then
163 | if [[ -z "$1" ]]; then
164 | sudo docker restart ${COMMUNITY_SERVER_ID};
165 | else
166 | sudo docker $1 ${COMMUNITY_SERVER_ID};
167 | fi
168 | else
169 | echo "COMMUNITY SERVER not found"
170 | fi
171 | }
172 |
173 | start_restart () {
174 | root_checking
175 |
176 | if ! command_exists sudo ; then
177 | install_sudo;
178 | fi
179 |
180 | if [ "$FAST" == "true" ]; then
181 | fast_restart
182 | else
183 | restart_document_server "stop"
184 | restart_mail_server "stop"
185 | restart_controlpanel "stop"
186 | restart_community_server "stop"
187 |
188 | restart_document_server "start"
189 | restart_mail_server "start"
190 | restart_controlpanel "start"
191 | restart_community_server "start"
192 | fi
193 |
194 | echo "restart complete"
195 | exit 0;
196 | }
197 |
198 |
199 | start_restart
--------------------------------------------------------------------------------
/web/Executables/run-community-server.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | UPDATE=0
15 | COMMUNITY_PORT=80
16 | COMMUNITY_IMAGE_NAME='onlyoffice/communityserver';
17 | COMMUNITY_CONTAINER_NAME='onlyoffice-community-server';
18 | DOCUMENT_CONTAINER_NAME='onlyoffice-document-server';
19 | MAIL_CONTAINER_NAME='onlyoffice-mail-server';
20 | CONTROLPANEL_CONTAINER_NAME='onlyoffice-control-panel';
21 |
22 | while [ "$1" != "" ]; do
23 | case $1 in
24 |
25 | -u | --update )
26 | UPDATE=1
27 | ;;
28 |
29 | -i | --image )
30 | if [ "$2" != "" ]; then
31 | COMMUNITY_IMAGE_NAME=$2
32 | shift
33 | fi
34 | ;;
35 |
36 | -v | --version )
37 | if [ "$2" != "" ]; then
38 | VERSION=$2
39 | shift
40 | fi
41 | ;;
42 |
43 | -c | --container )
44 | if [ "$2" != "" ]; then
45 | COMMUNITY_CONTAINER_NAME=$2
46 | shift
47 | fi
48 | ;;
49 |
50 | -dc | --documentcontainer )
51 | if [ "$2" != "" ]; then
52 | DOCUMENT_CONTAINER_NAME=$2
53 | shift
54 | fi
55 | ;;
56 |
57 | -mc | --mailcontainer )
58 | if [ "$2" != "" ]; then
59 | MAIL_CONTAINER_NAME=$2
60 | shift
61 | fi
62 | ;;
63 |
64 | -cc | --controlpanelcontainer )
65 | if [ "$2" != "" ]; then
66 | CONTROLPANEL_CONTAINER_NAME=$2
67 | shift
68 | fi
69 | ;;
70 |
71 | -p | --password )
72 | if [ "$2" != "" ]; then
73 | PASSWORD=$2
74 | shift
75 | fi
76 | ;;
77 |
78 | -un | --username )
79 | if [ "$2" != "" ]; then
80 | USERNAME=$2
81 | shift
82 | fi
83 | ;;
84 |
85 | -? | -h | --help )
86 | echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
87 | echo " Parameters:"
88 | echo " -u, --update update"
89 | echo " -i, --image image name"
90 | echo " -v, --version image version"
91 | echo " -c, --container container name"
92 | echo " -dc, --documentcontainer document container name"
93 | echo " -mc, --mailcontainer mail container name"
94 | echo " -cc, --controlpanelcontainer controlpanel container name"
95 | echo " -p, --password dockerhub password"
96 | echo " -un, --username dockerhub username"
97 | echo " -?, -h, --help this help"
98 | echo
99 | exit 0
100 | ;;
101 |
102 | * )
103 | echo "Unknown parameter $1" 1>&2
104 | exit 1
105 | ;;
106 | esac
107 | shift
108 | done
109 |
110 |
111 |
112 | COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
113 | DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
114 | MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
115 | CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
116 |
117 | if [[ -n ${COMMUNITY_SERVER_ID} ]]; then
118 | if [ "$UPDATE" == "1" ]; then
119 | sudo bash /app/onlyoffice/setup/tools/check-bindings.sh ${COMMUNITY_SERVER_ID}
120 |
121 | COMMUNITY_PORT=$(sudo docker port $COMMUNITY_SERVER_ID 80 | sed 's/.*://')
122 |
123 | sudo bash /app/onlyoffice/setup/tools/remove-container.sh ${COMMUNITY_CONTAINER_NAME}
124 | else
125 | echo "ONLYOFFICE COMMUNITY SERVER is already installed."
126 | sudo docker start ${COMMUNITY_SERVER_ID};
127 | echo "INSTALLATION-STOP-SUCCESS"
128 | exit 0;
129 | fi
130 | fi
131 |
132 | if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
133 | sudo bash /app/onlyoffice/setup/tools/login-docker.sh ${USERNAME} ${PASSWORD}
134 | fi
135 |
136 | if [[ -z ${VERSION} ]]; then
137 | GET_VERSION_COMMAND="sudo bash /app/onlyoffice/setup/tools/get-available-version.sh -i $COMMUNITY_IMAGE_NAME";
138 |
139 | if [[ -n ${PASSWORD} && -n ${USERNAME} ]]; then
140 | GET_VERSION_COMMAND="$GET_VERSION_COMMAND -un $USERNAME -p $PASSWORD";
141 | fi
142 |
143 | VERSION=$(${GET_VERSION_COMMAND});
144 | fi
145 |
146 | 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";
147 | RUN_COMMAND="$RUN_COMMAND -e ONLYOFFICE_MONOSERVE_COUNT=2";
148 |
149 | if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
150 | RUN_COMMAND="$RUN_COMMAND -e DOCUMENT_SERVER_PORT_80_TCP_ADDR=$DOCUMENT_CONTAINER_NAME";
151 | fi
152 |
153 | if [[ -n ${MAIL_SERVER_ID} ]]; then
154 | RUN_COMMAND="$RUN_COMMAND -e MAIL_SERVER_DB_HOST=${MAIL_CONTAINER_NAME}";
155 | fi
156 |
157 | if [[ -n ${CONTROL_PANEL_ID} ]]; then
158 | RUN_COMMAND="$RUN_COMMAND -e CONTROL_PANEL_PORT_80_TCP=80";
159 | RUN_COMMAND="$RUN_COMMAND -e CONTROL_PANEL_PORT_80_TCP_ADDR=$CONTROLPANEL_CONTAINER_NAME";
160 | fi
161 |
162 | RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data";
163 | RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/CommunityServer/mysql:/var/lib/mysql";
164 | RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice";
165 | RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/DocumentServerData";
166 | RUN_COMMAND="$RUN_COMMAND $COMMUNITY_IMAGE_NAME:$VERSION";
167 |
168 | ${RUN_COMMAND};
169 |
170 | COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
171 |
172 | if [[ -z ${COMMUNITY_SERVER_ID} ]]; then
173 | echo "ONLYOFFICE COMMUNITY SERVER not installed."
174 | echo "INSTALLATION-STOP-ERROR"
175 | exit 0;
176 | fi
177 |
178 | echo "ONLYOFFICE COMMUNITY SERVER successfully installed."
179 | echo "INSTALLATION-STOP-SUCCESS"
--------------------------------------------------------------------------------
/web/Executables/run-control-panel.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | UPDATE=0
15 | CONTROLPANEL_IMAGE_NAME='onlyoffice/controlpanel';
16 | CONTROLPANEL_CONTAINER_NAME='onlyoffice-control-panel';
17 |
18 | while [ "$1" != "" ]; do
19 | case $1 in
20 |
21 | -u | --update )
22 | UPDATE=1
23 | ;;
24 |
25 | -i | --image )
26 | if [ "$2" != "" ]; then
27 | CONTROLPANEL_IMAGE_NAME=$2
28 | shift
29 | fi
30 | ;;
31 |
32 | -v | --version )
33 | if [ "$2" != "" ]; then
34 | VERSION=$2
35 | shift
36 | fi
37 | ;;
38 |
39 | -c | --container )
40 | if [ "$2" != "" ]; then
41 | CONTROLPANEL_CONTAINER_NAME=$2
42 | shift
43 | fi
44 | ;;
45 |
46 | -p | --password )
47 | if [ "$2" != "" ]; then
48 | PASSWORD=$2
49 | shift
50 | fi
51 | ;;
52 |
53 | -un | --username )
54 | if [ "$2" != "" ]; then
55 | USERNAME=$2
56 | shift
57 | fi
58 | ;;
59 |
60 | -? | -h | --help )
61 | echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
62 | echo " Parameters:"
63 | echo " -u, --update update"
64 | echo " -i, --image image name"
65 | echo " -v, --version image version"
66 | echo " -c, --container container name"
67 | echo " -p, --password dockerhub password"
68 | echo " -un, --username dockerhub username"
69 | echo " -?, -h, --help this help"
70 | echo
71 | exit 0
72 | ;;
73 |
74 | * )
75 | echo "Unknown parameter $1" 1>&2
76 | exit 1
77 | ;;
78 | esac
79 | shift
80 | done
81 |
82 |
83 |
84 | CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
85 |
86 | if [[ -n ${CONTROL_PANEL_ID} ]]; then
87 | if [ "$UPDATE" == "1" ]; then
88 | sudo bash /app/onlyoffice/setup/tools/check-bindings.sh ${CONTROL_PANEL_ID}
89 | sudo bash /app/onlyoffice/setup/tools/remove-container.sh ${CONTROLPANEL_CONTAINER_NAME}
90 | else
91 | echo "ONLYOFFICE CONTROL PANEL is already installed."
92 | sudo docker start ${CONTROL_PANEL_ID};
93 | echo "INSTALLATION-STOP-SUCCESS"
94 | exit 0;
95 | fi
96 | fi
97 |
98 | if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
99 | sudo bash /app/onlyoffice/setup/tools/login-docker.sh ${USERNAME} ${PASSWORD}
100 | fi
101 |
102 | if [[ -z ${VERSION} ]]; then
103 | GET_VERSION_COMMAND="sudo bash /app/onlyoffice/setup/tools/get-available-version.sh -i $CONTROLPANEL_IMAGE_NAME";
104 |
105 | if [[ -n ${PASSWORD} && -n ${USERNAME} ]]; then
106 | GET_VERSION_COMMAND="$GET_VERSION_COMMAND -un $USERNAME -p $PASSWORD";
107 | fi
108 |
109 | VERSION=$(${GET_VERSION_COMMAND});
110 | fi
111 |
112 | sudo bash /app/onlyoffice/setup/tools/pull-image.sh ${CONTROLPANEL_IMAGE_NAME} ${VERSION}
113 |
114 | sudo docker run --net onlyoffice -i -t -d --restart=always --name ${CONTROLPANEL_CONTAINER_NAME} \
115 | -v /var/run/docker.sock:/var/run/docker.sock \
116 | -v /app/onlyoffice/CommunityServer/data:/app/onlyoffice/CommunityServer/data \
117 | -v /app/onlyoffice/DocumentServer/data:/app/onlyoffice/DocumentServer/data \
118 | -v /app/onlyoffice/MailServer/data:/app/onlyoffice/MailServer/data \
119 | -v /app/onlyoffice/ControlPanel/data:/var/www/onlyoffice-controlpanel/Data \
120 | -v /app/onlyoffice/ControlPanel/logs:/var/log/onlyoffice-controlpanel \
121 | -v /app/onlyoffice/ControlPanel/mysql:/var/lib/mysql \
122 | ${CONTROLPANEL_IMAGE_NAME}:${VERSION}
123 |
124 | CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
125 |
126 | if [[ -z ${CONTROL_PANEL_ID} ]]; then
127 | echo "ONLYOFFICE CONTROL PANEL not installed."
128 | echo "INSTALLATION-STOP-ERROR"
129 | exit 0;
130 | fi
131 |
132 | echo "ONLYOFFICE CONTROL PANEL successfully installed."
133 | echo "INSTALLATION-STOP-SUCCESS"
--------------------------------------------------------------------------------
/web/Executables/run-document-server.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | UPDATE=0
15 | DOCUMENT_IMAGE_NAME='onlyoffice/documentserver';
16 | DOCUMENT_CONTAINER_NAME='onlyoffice-document-server';
17 |
18 | while [ "$1" != "" ]; do
19 | case $1 in
20 |
21 | -u | --update )
22 | UPDATE=1
23 | ;;
24 |
25 | -i | --image )
26 | if [ "$2" != "" ]; then
27 | DOCUMENT_IMAGE_NAME=$2
28 | shift
29 | fi
30 | ;;
31 |
32 | -v | --version )
33 | if [ "$2" != "" ]; then
34 | VERSION=$2
35 | shift
36 | fi
37 | ;;
38 |
39 | -c | --container )
40 | if [ "$2" != "" ]; then
41 | DOCUMENT_CONTAINER_NAME=$2
42 | shift
43 | fi
44 | ;;
45 |
46 | -p | --password )
47 | if [ "$2" != "" ]; then
48 | PASSWORD=$2
49 | shift
50 | fi
51 | ;;
52 |
53 | -un | --username )
54 | if [ "$2" != "" ]; then
55 | USERNAME=$2
56 | shift
57 | fi
58 | ;;
59 |
60 | -? | -h | --help )
61 | echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
62 | echo " Parameters:"
63 | echo " -u, --update update"
64 | echo " -i, --image image name"
65 | echo " -v, --version image version"
66 | echo " -c, --container container name"
67 | echo " -p, --password dockerhub password"
68 | echo " -un, --username dockerhub username"
69 | echo " -?, -h, --help this help"
70 | echo
71 | exit 0
72 | ;;
73 |
74 | * )
75 | echo "Unknown parameter $1" 1>&2
76 | exit 1
77 | ;;
78 | esac
79 | shift
80 | done
81 |
82 |
83 |
84 | DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
85 |
86 | if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
87 | if [ "$UPDATE" == "1" ]; then
88 | sudo bash /app/onlyoffice/setup/tools/check-bindings.sh ${DOCUMENT_SERVER_ID} "/etc/onlyoffice,/var/lib/onlyoffice"
89 | sudo bash /app/onlyoffice/setup/tools/remove-container.sh ${DOCUMENT_CONTAINER_NAME}
90 | else
91 | echo "ONLYOFFICE DOCUMENT SERVER is already installed."
92 | sudo docker start ${DOCUMENT_SERVER_ID};
93 | echo "INSTALLATION-STOP-SUCCESS"
94 | exit 0;
95 | fi
96 | fi
97 |
98 | if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
99 | sudo bash /app/onlyoffice/setup/tools/login-docker.sh ${USERNAME} ${PASSWORD}
100 | fi
101 |
102 | if [[ -z ${VERSION} ]]; then
103 | GET_VERSION_COMMAND="sudo bash /app/onlyoffice/setup/tools/get-available-version.sh -i $DOCUMENT_IMAGE_NAME";
104 |
105 | if [[ -n ${PASSWORD} && -n ${USERNAME} ]]; then
106 | GET_VERSION_COMMAND="$GET_VERSION_COMMAND -un $USERNAME -p $PASSWORD";
107 | fi
108 |
109 | VERSION=$(${GET_VERSION_COMMAND});
110 | fi
111 |
112 | sudo bash /app/onlyoffice/setup/tools/pull-image.sh ${DOCUMENT_IMAGE_NAME} ${VERSION}
113 |
114 | sudo docker run --net onlyoffice -i -t -d --restart=always --name ${DOCUMENT_CONTAINER_NAME} \
115 | -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
116 | -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
117 | ${DOCUMENT_IMAGE_NAME}:${VERSION}
118 |
119 | DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
120 |
121 | if [[ -z ${DOCUMENT_SERVER_ID} ]]; then
122 | echo "ONLYOFFICE DOCUMENT SERVER not installed."
123 | echo "INSTALLATION-STOP-ERROR"
124 | exit 0;
125 | fi
126 |
127 | echo "ONLYOFFICE DOCUMENT SERVER successfully installed."
128 | echo "INSTALLATION-STOP-SUCCESS"
--------------------------------------------------------------------------------
/web/Executables/run-mail-server.sh:
--------------------------------------------------------------------------------
1 | #/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | UPDATE=0
15 | MAIL_IMAGE_NAME='onlyoffice/mailserver';
16 | MAIL_CONTAINER_NAME='onlyoffice-mail-server';
17 |
18 | while [ "$1" != "" ]; do
19 | case $1 in
20 |
21 | -u | --update )
22 | UPDATE=1
23 | ;;
24 |
25 | -i | --image )
26 | if [ "$2" != "" ]; then
27 | MAIL_IMAGE_NAME=$2
28 | shift
29 | fi
30 | ;;
31 |
32 | -v | --version )
33 | if [ "$2" != "" ]; then
34 | VERSION=$2
35 | shift
36 | fi
37 | ;;
38 |
39 | -c | --container )
40 | if [ "$2" != "" ]; then
41 | MAIL_CONTAINER_NAME=$2
42 | shift
43 | fi
44 | ;;
45 |
46 | -d | --domain )
47 | if [ "$2" != "" ]; then
48 | MAIL_DOMAIN_NAME=$2
49 | shift
50 | fi
51 | ;;
52 |
53 | -p | --password )
54 | if [ "$2" != "" ]; then
55 | PASSWORD=$2
56 | shift
57 | fi
58 | ;;
59 |
60 | -un | --username )
61 | if [ "$2" != "" ]; then
62 | USERNAME=$2
63 | shift
64 | fi
65 | ;;
66 |
67 | -? | -h | --help )
68 | echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
69 | echo " Parameters:"
70 | echo " -u, --update update"
71 | echo " -i, --image image name"
72 | echo " -v, --version image version"
73 | echo " -c, --container container name"
74 | echo " -d, --domain domain name"
75 | echo " -p, --password dockerhub password"
76 | echo " -un, --username dockerhub username"
77 | echo " -?, -h, --help this help"
78 | echo
79 | exit 0
80 | ;;
81 |
82 | * )
83 | echo "Unknown parameter $1" 1>&2
84 | exit 1
85 | ;;
86 | esac
87 | shift
88 | done
89 |
90 |
91 |
92 | MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
93 |
94 | if [[ -n ${MAIL_SERVER_ID} ]]; then
95 | if [ "$UPDATE" == "1" ]; then
96 | sudo bash /app/onlyoffice/setup/tools/check-bindings.sh ${MAIL_SERVER_ID}
97 |
98 | if [[ -z ${MAIL_DOMAIN_NAME} ]]; then
99 | MAIL_DOMAIN_NAME=$(sudo docker exec $MAIL_SERVER_ID hostname -f);
100 | fi
101 |
102 | sudo bash /app/onlyoffice/setup/tools/remove-container.sh ${MAIL_CONTAINER_NAME}
103 | else
104 | echo "ONLYOFFICE MAIL SERVER is already installed."
105 | sudo docker start ${MAIL_SERVER_ID};
106 | echo "INSTALLATION-STOP-SUCCESS"
107 | exit 0;
108 | fi
109 | fi
110 |
111 | if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
112 | sudo bash /app/onlyoffice/setup/tools/login-docker.sh ${USERNAME} ${PASSWORD}
113 | fi
114 |
115 | if [[ -z ${VERSION} ]]; then
116 | GET_VERSION_COMMAND="sudo bash /app/onlyoffice/setup/tools/get-available-version.sh -i $MAIL_IMAGE_NAME";
117 |
118 | if [[ -n ${PASSWORD} && -n ${USERNAME} ]]; then
119 | GET_VERSION_COMMAND="$GET_VERSION_COMMAND -un $USERNAME -p $PASSWORD";
120 | fi
121 |
122 | VERSION=$(${GET_VERSION_COMMAND});
123 | fi
124 |
125 | if [[ -z ${MAIL_DOMAIN_NAME} ]]; then
126 | echo "Please, set domain name for mail server"
127 | echo "INSTALLATION-STOP-ERROR[4]"
128 | exit 0;
129 | fi
130 |
131 | sudo bash /app/onlyoffice/setup/tools/pull-image.sh ${MAIL_IMAGE_NAME} ${VERSION}
132 |
133 | sudo docker run --net onlyoffice --privileged -i -t -d --restart=always --name ${MAIL_CONTAINER_NAME} -p 25:25 -p 143:143 -p 587:587 \
134 | -v /app/onlyoffice/MailServer/data:/var/vmail \
135 | -v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
136 | -v /app/onlyoffice/MailServer/logs:/var/log \
137 | -v /app/onlyoffice/MailServer/mysql:/var/lib/mysql \
138 | -h ${MAIL_DOMAIN_NAME} ${MAIL_IMAGE_NAME}:${VERSION}
139 |
140 | MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
141 |
142 | if [[ -z ${MAIL_SERVER_ID} ]]; then
143 | echo "ONLYOFFICE MAIL SERVER not installed."
144 | echo "INSTALLATION-STOP-ERROR"
145 | exit 0;
146 | fi
147 |
148 | echo "ONLYOFFICE MAIL SERVER successfully installed."
149 | echo "INSTALLATION-STOP-SUCCESS"
--------------------------------------------------------------------------------
/web/Executables/tools/check-bindings.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | if [[ -z "$1" ]]; then
15 | echo "container id is empty";
16 | exit 0;
17 | fi
18 |
19 | binds=$(sudo docker inspect --format='{{range $p,$conf:=.HostConfig.Binds}}{{$conf}};{{end}}' $1)
20 | volumes=$(sudo docker inspect --format='{{range $p,$conf:=.Config.Volumes}}{{$p}};{{end}}' $1)
21 | arrBinds=$(echo $binds | tr ";" "\n")
22 | arrVolumes=$(echo $volumes | tr ";" "\n")
23 | bindsCorrect=1
24 |
25 | if [[ -n "$2" ]]; then
26 | exceptions=$(echo $2 | tr "," "\n")
27 | for ex in ${exceptions[@]}
28 | do
29 | arrVolumes=(${arrVolumes[@]/$ex})
30 | done
31 | fi
32 |
33 | for volume in $arrVolumes
34 | do
35 | bindExist=0
36 | for bind in $arrBinds
37 | do
38 | bind=($(echo $bind | tr ":" " "))
39 | if [ "${bind[1]}" == "${volume}" ]; then
40 | bindExist=1
41 | fi
42 | done
43 | if [ "$bindExist" = "0" ]; then
44 | bindsCorrect=0
45 | echo "${volume} not binded"
46 | fi
47 | done
48 |
49 | if [ "$bindsCorrect" = "0" ]; then
50 | echo "INSTALLATION-STOP-ERROR";
51 | exit 0;
52 | fi
53 |
--------------------------------------------------------------------------------
/web/Executables/tools/check-ports.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | STR_PORTS=${1}
15 | ARRAY_PORTS=(${STR_PORTS//,/ })
16 |
17 | for PORT in "${ARRAY_PORTS[@]}"
18 | do
19 | REGEXP=":$PORT$"
20 | CHECK_RESULT=$(sudo netstat -lnp | awk '{print $4}' | grep $REGEXP)
21 |
22 | if [[ $CHECK_RESULT != "" ]]; then
23 | echo "The following ports must be open: $PORT"
24 | echo "INSTALLATION-STOP-ERROR[3]"
25 | exit 0;
26 | fi
27 | done
28 |
29 | echo "INSTALLATION-STOP-SUCCESS"
30 |
--------------------------------------------------------------------------------
/web/Executables/tools/check-previous-version.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | COMMUNITY_SERVER_VERSION='';
15 | DOCUMENT_SERVER_VERSION='';
16 | MAIL_SERVER_VERSION='';
17 | CONTROL_PANEL_VERSION='';
18 | LICENSE_FILE_EXIST="false";
19 |
20 | COMMUNITY_CONTAINER_NAME='onlyoffice-community-server';
21 | DOCUMENT_CONTAINER_NAME='onlyoffice-document-server';
22 | MAIL_CONTAINER_NAME='onlyoffice-mail-server';
23 | CONTROLPANEL_CONTAINER_NAME='onlyoffice-control-panel';
24 |
25 | while [ "$1" != "" ]; do
26 | case $1 in
27 |
28 | -cc | --communitycontainer )
29 | if [ "$2" != "" ]; then
30 | COMMUNITY_CONTAINER_NAME=$2
31 | shift
32 | fi
33 | ;;
34 |
35 | -dc | --documentcontainer )
36 | if [ "$2" != "" ]; then
37 | DOCUMENT_CONTAINER_NAME=$2
38 | shift
39 | fi
40 | ;;
41 |
42 | -mc | --mailcontainer )
43 | if [ "$2" != "" ]; then
44 | MAIL_CONTAINER_NAME=$2
45 | shift
46 | fi
47 | ;;
48 |
49 | -cpc | --controlpanelcontainer )
50 | if [ "$2" != "" ]; then
51 | CONTROLPANEL_CONTAINER_NAME=$2
52 | shift
53 | fi
54 | ;;
55 |
56 | -? | -h | --help )
57 | echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
58 | echo " Parameters:"
59 | echo " -cc, --communitycontainer community container name"
60 | echo " -dc, --documentcontainer document container name"
61 | echo " -mc, --mailcontainer mail container name"
62 | echo " -cpc, --controlpanelcontainer controlpanel container name"
63 | echo " -?, -h, --help this help"
64 | echo
65 | exit 0
66 | ;;
67 |
68 | * )
69 | echo "Unknown parameter $1" 1>&2
70 | exit 1
71 | ;;
72 | esac
73 | shift
74 | done
75 |
76 | root_checking () {
77 | if [ ! $( id -u ) -eq 0 ]; then
78 | echo "To perform this action you must be logged in with root rights"
79 | echo "INSTALLATION-STOP-ERROR[8]"
80 | exit 0;
81 | fi
82 | }
83 |
84 | command_exists () {
85 | type "$1" &> /dev/null ;
86 | }
87 |
88 | install_sudo () {
89 | if command_exists apt-get ; then
90 | apt-get install sudo
91 | elif command_exists yum ; then
92 | yum install sudo
93 | fi
94 |
95 | if command_exists sudo ; then
96 | echo "sudo successfully installed"
97 | else
98 | echo "command sudo not found"
99 | echo "INSTALLATION-STOP-ERROR[5]"
100 | exit 0;
101 | fi
102 | }
103 |
104 | check_license_file_in_dir () {
105 | if [ "LICENSE_FILE_EXIST" != "true" ]; then
106 | if [ -d "$1" ]; then
107 | for file in "$1"/*.lic
108 | do
109 | if [ -f "${file}" ]; then
110 | LICENSE_FILE_EXIST="true";
111 | break
112 | fi
113 | done
114 | fi
115 | fi
116 | }
117 |
118 | check_license_file () {
119 | check_license_file_in_dir "/app/onlyoffice/DocumentServer/data"
120 | check_license_file_in_dir "/app/onlyoffice/DocumentServer/data"
121 | check_license_file_in_dir "/app/onlyoffice/MailServer/data"
122 | check_license_file_in_dir "/app/onlyoffice/ControlPanel/data"
123 | }
124 |
125 | root_checking
126 |
127 | if ! command_exists sudo ; then
128 | install_sudo;
129 | fi
130 |
131 |
132 | if command_exists docker ; then
133 | MAIL_SERVER_VERSION=$(sudo docker ps -a | grep ${MAIL_CONTAINER_NAME} | awk '{print $2}' | sed 's/.*://');
134 | DOCUMENT_SERVER_VERSION=$(sudo docker ps -a | grep ${DOCUMENT_CONTAINER_NAME} | awk '{print $2}' | sed 's/.*://');
135 | COMMUNITY_SERVER_VERSION=$(sudo docker ps -a | grep ${COMMUNITY_CONTAINER_NAME} | awk '{print $2}' | sed 's/.*://');
136 | CONTROL_PANEL_VERSION=$(sudo docker ps -a | grep ${CONTROLPANEL_CONTAINER_NAME} | awk '{print $2}' | sed 's/.*://');
137 | fi
138 |
139 | check_license_file
140 |
141 | echo "MAIL_SERVER_VERSION: [$MAIL_SERVER_VERSION]"
142 | echo "DOCUMENT_SERVER_VERSION: [$DOCUMENT_SERVER_VERSION]"
143 | echo "COMMUNITY_SERVER_VERSION: [$COMMUNITY_SERVER_VERSION]"
144 | echo "CONTROL_PANEL_VERSION: [$CONTROL_PANEL_VERSION]"
145 | echo "LICENSE_FILE_EXIST: [$LICENSE_FILE_EXIST]"
146 |
147 |
148 | echo "INSTALLATION-STOP-SUCCESS"
--------------------------------------------------------------------------------
/web/Executables/tools/get-available-version.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | #!/bin/bash
15 |
16 | while [ "$1" != "" ]; do
17 | case $1 in
18 | -i | --image )
19 | IMAGE=$2
20 | shift
21 | ;;
22 |
23 | -un | --username )
24 | USERNAME=$2
25 | shift
26 | ;;
27 |
28 | -p | --password )
29 | PASSWORD=$2
30 | shift
31 | ;;
32 |
33 | -? | -h | --help )
34 | echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
35 | echo " Parameters:"
36 | echo " -i, --image image"
37 | echo " -un, --username dockerhub username"
38 | echo " -p, --password dockerhub password"
39 | echo " -?, -h, --help this help"
40 | echo
41 | exit 0
42 | ;;
43 |
44 | * )
45 | echo "Unknown parameter $1" 1>&2
46 | exit 1
47 | ;;
48 | esac
49 | shift
50 | done
51 |
52 |
53 |
54 | command_exists () {
55 | type "$1" &> /dev/null;
56 | }
57 |
58 | install_curl () {
59 | if command_exists apt-get; then
60 | sudo apt-get -y -q install curl
61 | elif command_exists yum; then
62 | sudo yum -y install curl
63 | fi
64 |
65 | if ! command_exists curl; then
66 | echo "command curl not found"
67 | exit 0;
68 | fi
69 | }
70 |
71 |
72 |
73 | if [ "$IMAGE" == "" ]; then
74 | echo "image name is empty"
75 | exit 0
76 | fi
77 |
78 | if ! command_exists curl ; then
79 | install_curl;
80 | fi
81 |
82 | CREDENTIALS="";
83 | AUTH_HEADER="";
84 |
85 | if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
86 | CREDENTIALS="{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\"}";
87 | fi
88 |
89 | if [[ -n ${CREDENTIALS} ]]; then
90 | LOGIN_RESP=$(curl -s -H "Content-Type: application/json" -X POST -d "$CREDENTIALS" https://hub.docker.com/v2/users/login/)
91 | TOKEN=$(echo $LOGIN_RESP | sed 's/"token"//g' | tr -d '{}:" ')
92 | AUTH_HEADER="Authorization: JWT $TOKEN"
93 | fi
94 |
95 | TAGS_RESP=$(curl -s -H "$AUTH_HEADER" -X GET https://hub.docker.com/v2/repositories/${IMAGE}/tags/);
96 | TAGS_RESP=$(echo $TAGS_RESP | tr -d '[]{},:"')
97 |
98 | VERSION_REGEX_1="[0-9]+\.[0-9]+\.[0-9]+"
99 | VERSION_REGEX_2="[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+"
100 | TAG_LIST=""
101 |
102 | for item in $TAGS_RESP
103 | do
104 | if [[ $item =~ $VERSION_REGEX_1 ]] || [[ $item =~ $VERSION_REGEX_2 ]]; then
105 | TAG_LIST="$item,$TAG_LIST"
106 | fi
107 | done
108 |
109 | 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}');
110 |
111 | echo "$LATEST_TAG"
112 |
113 |
--------------------------------------------------------------------------------
/web/Executables/tools/get-os-info.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | to_lowercase () {
15 | echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
16 | }
17 |
18 | get_os_info () {
19 | OS=`to_lowercase \`uname\``
20 |
21 | if [ "${OS}" == "windowsnt" ]; then
22 | echo "Not supported OS";
23 | exit 0;
24 | elif [ "${OS}" == "darwin" ]; then
25 | echo "Not supported OS";
26 | exit 0;
27 | else
28 | OS=`uname`
29 |
30 | if [ "${OS}" = "SunOS" ] ; then
31 | echo "Not supported OS";
32 | exit 0;
33 | elif [ "${OS}" = "AIX" ] ; then
34 | echo "Not supported OS";
35 | exit 0;
36 | elif [ "${OS}" = "Linux" ] ; then
37 | MACH=`uname -m`
38 |
39 | if [ "${MACH}" != "x86_64" ]; then
40 | echo "Currently only supports 64bit OS's";
41 | exit 0;
42 | fi
43 |
44 | KERNEL=`uname -r`
45 |
46 | if [ -f /etc/redhat-release ] ; then
47 | DIST=`cat /etc/redhat-release |sed s/\ release.*//`
48 | REV=`cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//`
49 | elif [ -f /etc/SuSE-release ] ; then
50 | REV=`cat /etc/os-release | grep '^VERSION_ID' | awk -F= '{ print $2 }' | sed -e 's/^"//' -e 's/"$//'`
51 | DIST='SuSe'
52 | elif [ -f /etc/debian_version ] ; then
53 | REV=`cat /etc/debian_version`
54 | DIST='Debian'
55 | if [ -f /etc/lsb-release ] ; then
56 | DIST=`cat /etc/lsb-release | grep '^DISTRIB_ID' | awk -F= '{ print $2 }'`
57 | REV=`cat /etc/lsb-release | grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }'`
58 | elif [[ -f /etc/lsb_release ]]; then
59 | DIST=`lsb_release -a 2>&1 | grep 'Distributor ID:' | awk -F ":" '{print $2 }'`
60 | REV=`lsb_release -a 2>&1 | grep 'Release:' | awk -F ":" '{print $2 }'`
61 | fi
62 | fi
63 |
64 | readonly DIST
65 | readonly REV
66 | readonly KERNEL
67 | readonly MACH
68 |
69 | fi
70 | fi
71 | }
72 |
73 |
74 |
75 | get_os_info
76 |
77 | echo "DIST: [$DIST]"
78 | echo "REV: [$REV]"
79 | echo "MACH: [$MACH]"
80 | echo "KERNEL: [$KERNEL]"
81 |
82 | echo "INSTALLATION-STOP-SUCCESS"
--------------------------------------------------------------------------------
/web/Executables/tools/login-docker.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | USERNAME=$1;
15 | PASSWORD=$2;
16 |
17 | if [[ -n ${USERNAME} && -n ${PASSWORD} ]]; then
18 | sudo docker login -u ${USERNAME} -p ${PASSWORD}
19 | fi
20 |
--------------------------------------------------------------------------------
/web/Executables/tools/make-dir.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | sudo mkdir -p "/app/onlyoffice/setup";
15 |
16 | sudo mkdir -p "/app/onlyoffice/DocumentServer/data";
17 | sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/FileConverterService";
18 | sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/CoAuthoringService";
19 | sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/DocService";
20 | sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/SpellCheckerService";
21 | sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/LibreOfficeService";
22 |
23 | sudo mkdir -p "/app/onlyoffice/MailServer/data/certs";
24 | sudo mkdir -p "/app/onlyoffice/MailServer/logs";
25 | sudo mkdir -p "/app/onlyoffice/MailServer/mysql";
26 |
27 | sudo mkdir -p "/app/onlyoffice/CommunityServer/data";
28 | sudo mkdir -p "/app/onlyoffice/CommunityServer/logs";
29 | sudo mkdir -p "/app/onlyoffice/CommunityServer/mysql";
30 |
31 | sudo mkdir -p "/app/onlyoffice/ControlPanel/data";
32 | sudo mkdir -p "/app/onlyoffice/ControlPanel/logs";
33 | sudo mkdir -p "/app/onlyoffice/ControlPanel/mysql";
34 |
35 | sudo chmod 777 /app -R
36 |
37 | echo "INSTALLATION-STOP-SUCCESS"
--------------------------------------------------------------------------------
/web/Executables/tools/make-network.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | EXIST=$(sudo docker network ls | awk '{print $2;}' | grep -x onlyoffice);
15 |
16 | if [[ -z $EXIST ]]; then
17 | sudo docker network create --driver bridge onlyoffice
18 | fi
19 |
20 | echo "INSTALLATION-STOP-SUCCESS"
--------------------------------------------------------------------------------
/web/Executables/tools/pull-image.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | IMAGE_NAME=$1;
15 | IMAGE_VERSION=$2;
16 |
17 | if [[ -z ${IMAGE_NAME} || -z ${IMAGE_VERSION} ]]; then
18 | echo "Docker pull argument exception: repository=$IMAGE_NAME, tag=$IMAGE_VERSION"
19 | echo "INSTALLATION-STOP-ERROR";
20 | exit 0;
21 | fi
22 |
23 | EXIST=$(sudo docker images | grep "$IMAGE_NAME" | awk '{print $2;}' | grep -x "$IMAGE_VERSION");
24 | COUNT=1;
25 |
26 | while [[ -z $EXIST && $COUNT -le 3 ]]; do
27 | sudo docker pull ${IMAGE_NAME}:${IMAGE_VERSION}
28 | EXIST=$(sudo docker images | grep "$IMAGE_NAME" | awk '{print $2;}' | grep -x "$IMAGE_VERSION");
29 | (( COUNT++ ))
30 | done
31 |
32 | if [[ -z $EXIST ]]; then
33 | echo "Docker image $IMAGE_NAME:$IMAGE_VERSION not found"
34 | echo "INSTALLATION-STOP-ERROR";
35 | exit 0;
36 | fi
37 |
--------------------------------------------------------------------------------
/web/Executables/tools/remove-container.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # (c) Copyright Ascensio System Limited 2010-2015
4 | # Licensed under the Apache License, Version 2.0 (the "License");
5 | # you may not use this file except in compliance with the License.
6 | # You may obtain a copy of the License at
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 | # Unless required by applicable law or agreed to in writing,
9 | # software distributed under the License is distributed on an "AS IS" BASIS,
10 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 | # See the License for the specific language governing permissions and limitations under the License.
12 | # You can contact Ascensio System SIA by email at sales@onlyoffice.com
13 |
14 | remove_container () {
15 | CONTAINER_NAME=$1;
16 |
17 | if [[ -z ${CONTAINER_NAME} ]]; then
18 | echo "Empty container name"
19 | echo "INSTALLATION-STOP-ERROR";
20 | exit 0;
21 | fi
22 |
23 | echo "stop container:"
24 | sudo docker stop ${CONTAINER_NAME};
25 | echo "remove container:"
26 | sudo docker rm -f ${CONTAINER_NAME};
27 |
28 | sleep 10 #Hack for SuSe: exception "Error response from daemon: devmapper: Unknown device xxx"
29 |
30 | echo "check removed container:"
31 | CONTAINER_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTAINER_NAME});
32 |
33 | if [[ -n ${CONTAINER_ID} ]]; then
34 | echo "try again remove ${CONTAINER_NAME}"
35 | remove_container ${CONTAINER_NAME}
36 | fi
37 | }
38 |
39 | remove_container $1
40 |
--------------------------------------------------------------------------------
/web/Global.asax:
--------------------------------------------------------------------------------
1 | <%@ Application Codebehind="Global.asax.cs" Inherits="OneClickInstallation.MvcApplication" Language="C#" %>
2 |
--------------------------------------------------------------------------------
/web/Global.asax.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System;
21 | using System.Globalization;
22 | using System.Reflection;
23 | using System.Threading;
24 | using System.Web.Mvc;
25 | using System.Web.Routing;
26 | using System.Web.Optimization;
27 | using OneClickInstallation.Helpers;
28 | using TMResourceData;
29 | using log4net.Config;
30 |
31 | namespace OneClickInstallation
32 | {
33 | public class MvcApplication : System.Web.HttpApplication
34 | {
35 | protected void Application_Start()
36 | {
37 | XmlConfigurator.Configure();
38 | AreaRegistration.RegisterAllAreas();
39 | RouteConfig.RegisterRoutes(RouteTable.Routes);
40 | BundleConfig.RegisterBundles(BundleTable.Bundles);
41 |
42 | InitializeDbResources();
43 | }
44 |
45 | private static void InitializeDbResources()
46 | {
47 | if (!Settings.ResourcesFromDataBase) return;
48 |
49 | DBResourceManager.PatchAssemblies();
50 | DBResourceManager.PatchAssembly(Assembly.GetExecutingAssembly(), false);
51 | }
52 |
53 | protected void Application_BeginRequest(object sender, EventArgs e)
54 | {
55 | var httpContext = Request.RequestContext.HttpContext;
56 | var routeData = httpContext != null ? RouteTable.Routes.GetRouteData(httpContext) : null;
57 |
58 | if (routeData == null)
59 | return;
60 |
61 | var routeLanguage = routeData.Values["lang"] != null ? routeData.Values["lang"].ToString() : null;
62 |
63 | if (string.IsNullOrEmpty(routeLanguage))
64 | return;
65 |
66 | if (routeLanguage == LangHelper.DefaultLanguage)
67 | Response.RedirectToRoutePermanent("Default", new
68 | {
69 | controller = routeData.Values["controller"].ToString(),
70 | action = routeData.Values["action"].ToString(),
71 | id = routeData.Values["id"].ToString(),
72 | });
73 | }
74 |
75 | protected void Application_AcquireRequestState(object sender, EventArgs e)
76 | {
77 | var handler = Context.Handler as MvcHandler;
78 | var routeData = handler != null ? handler.RequestContext.RouteData : null;
79 | var routeLanguage = routeData != null && routeData.Values["lang"] != null ? routeData.Values["lang"].ToString() : null;
80 | var cultureInfo = CultureInfo.CreateSpecificCulture(!string.IsNullOrEmpty(routeLanguage) ? routeLanguage : LangHelper.DefaultLanguage);
81 |
82 | if (!Equals(Thread.CurrentThread.CurrentCulture, cultureInfo))
83 | Thread.CurrentThread.CurrentCulture = cultureInfo;
84 |
85 | if (!Equals(Thread.CurrentThread.CurrentUICulture, cultureInfo))
86 | Thread.CurrentThread.CurrentUICulture = cultureInfo;
87 | }
88 | }
89 | }
--------------------------------------------------------------------------------
/web/Helpers/CacheHelper.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System;
21 | using System.Collections.Generic;
22 | using System.Globalization;
23 | using System.Web;
24 | using System.Web.Caching;
25 | using OneClickInstallation.Classes;
26 | using OneClickInstallation.Models;
27 |
28 | namespace OneClickInstallation.Helpers
29 | {
30 | public static class CacheHelper
31 | {
32 | public static ConnectionSettingsModel GetConnectionSettings(string userId)
33 | {
34 | if (string.IsNullOrEmpty(userId)) return null;
35 |
36 | var key = "connectionSettings" + userId;
37 | return CacheGet(key);
38 | }
39 |
40 | public static void SetConnectionSettings(string userId, ConnectionSettingsModel value)
41 | {
42 | if (string.IsNullOrEmpty(userId)) return;
43 |
44 | var key = "connectionSettings" + userId;
45 | CacheSet(key, value, TimeSpan.FromDays(1));
46 | }
47 |
48 |
49 | public static InstallationComponentsModel GetInstalledComponents(string userId)
50 | {
51 | if (string.IsNullOrEmpty(userId)) return null;
52 |
53 | var key = "installedComponents" + userId;
54 | return CacheGet(key);
55 | }
56 |
57 | public static void SetInstalledComponents(string userId, InstallationComponentsModel value)
58 | {
59 | if (string.IsNullOrEmpty(userId)) return;
60 |
61 | var key = "installedComponents" + userId;
62 | CacheSet(key, value, TimeSpan.FromDays(1));
63 | }
64 |
65 |
66 | public static InstallationComponentsModel GetSelectedComponents(string userId)
67 | {
68 | if (string.IsNullOrEmpty(userId)) return null;
69 |
70 | var key = "selectedComponents" + userId;
71 | return CacheGet(key);
72 | }
73 |
74 | public static void SetSelectedComponents(string userId, InstallationComponentsModel value)
75 | {
76 | if (string.IsNullOrEmpty(userId)) return;
77 |
78 | var key = "selectedComponents" + userId;
79 | CacheSet(key, value, TimeSpan.FromDays(1));
80 | }
81 |
82 |
83 | public static InstallationProgressModel GetInstallationProgress(string userId)
84 | {
85 | if (string.IsNullOrEmpty(userId)) return null;
86 |
87 | var key = "installationProgress" + userId;
88 | return CacheGet(key);
89 | }
90 |
91 | public static void SetInstallationProgress(string userId, InstallationProgressModel value)
92 | {
93 | if (string.IsNullOrEmpty(userId)) return;
94 |
95 | var key = "installationProgress" + userId;
96 | CacheSet(key, value, TimeSpan.FromDays(1));
97 | }
98 |
99 |
100 | public static OsInfo GetOsInfo(string userId)
101 | {
102 | var key = "osInfo" + userId;
103 | return CacheGet(key);
104 | }
105 |
106 | public static void SetOsInfo(string userId, OsInfo value)
107 | {
108 | var key = "osInfo" + userId;
109 | CacheSet(key, value, TimeSpan.FromDays(1));
110 | }
111 |
112 |
113 | public static RequestInfoModel GetRequestInfo(string userId)
114 | {
115 | var key = "requestInfo" + userId;
116 | return CacheGet(key);
117 | }
118 |
119 | public static void SetRequestInfo(string userId, RequestInfoModel value)
120 | {
121 | var key = "requestInfo" + userId;
122 | CacheSet(key, value, TimeSpan.FromDays(1));
123 | }
124 |
125 |
126 | public static string GetJsResuorce(string culture)
127 | {
128 | if (string.IsNullOrEmpty(culture)) return null;
129 |
130 | var key = "jsResuorce" + culture;
131 | return CacheGet(key);
132 | }
133 |
134 | public static void SetJsResuorce(string culture, string value)
135 | {
136 | if (string.IsNullOrEmpty(culture)) return;
137 |
138 | var key = "jsResuorce" + culture;
139 | CacheSet(key, value, TimeSpan.FromDays(1));
140 | }
141 |
142 |
143 | public static InstallationComponentsModel GetAvailableComponents(bool enterprise)
144 | {
145 | var res = CacheGet(enterprise ? "availableEnterpriseComponents" : "availableComponents");
146 | return res ?? TagHelper.InitializeAvailableTags(enterprise);
147 | }
148 |
149 | public static void SetAvailableComponents(bool enterprise, InstallationComponentsModel value)
150 | {
151 | CacheSet(enterprise ? "availableEnterpriseComponents" : "availableComponents", value, TimeSpan.FromDays(1));
152 | }
153 |
154 |
155 | public static void ClearUserCache(string userId)
156 | {
157 | SetConnectionSettings(userId, null);
158 | SetInstalledComponents(userId, null);
159 | SetSelectedComponents(userId, null);
160 | SetInstallationProgress(userId, null);
161 | SetOsInfo(userId, null);
162 | SetRequestInfo(userId, null);
163 | }
164 |
165 | public static void ClearCache()
166 | {
167 | foreach (var lang in LangHelper.GetLanguages())
168 | {
169 | SetJsResuorce(new CultureInfo(lang).TwoLetterISOLanguageName, null);
170 | }
171 |
172 | SetAvailableComponents(true, null);
173 | SetAvailableComponents(false, null);
174 | }
175 |
176 |
177 | private static T CacheGet(string key)
178 | {
179 | var value = HttpRuntime.Cache.Get(key);
180 | return (T)value;
181 | }
182 |
183 | private static void CacheSet(string key, T value, TimeSpan slidingExpiration)
184 | {
185 | if (Equals(value, default(T)))
186 | HttpRuntime.Cache.Remove(key);
187 | else
188 | HttpRuntime.Cache.Insert(key, value, null, Cache.NoAbsoluteExpiration, slidingExpiration);
189 | }
190 | }
191 | }
--------------------------------------------------------------------------------
/web/Helpers/CookieHelper.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System;
21 | using System.Web;
22 | using System.Web.Security;
23 |
24 | namespace OneClickInstallation.Helpers
25 | {
26 | public class CookieHelper
27 | {
28 | private const string CookieKey = "ociuserid";
29 |
30 | public static string GetCookie()
31 | {
32 | var cookie = HttpContext.Current.Request.Cookies[CookieKey];
33 |
34 | if (cookie != null && !string.IsNullOrEmpty(cookie.Value))
35 | {
36 | var ticket = FormsAuthentication.Decrypt(cookie.Value);
37 |
38 | if (ticket == null || ticket.Expired) return null;
39 |
40 | return ticket.UserData;
41 | }
42 |
43 | return null;
44 | }
45 |
46 | public static void SetCookie(string value)
47 | {
48 | var now = DateTime.Now;
49 |
50 | var ticket = new FormsAuthenticationTicket(1, CookieKey, now, now.AddDays(1), true, value);
51 |
52 | var ticketKey = FormsAuthentication.Encrypt(ticket);
53 |
54 | var cookie = new HttpCookie(CookieKey, ticketKey)
55 | {
56 | Expires = now.AddDays(1),
57 | HttpOnly = true
58 | };
59 |
60 | HttpContext.Current.Response.Cookies.Add(cookie);
61 | }
62 |
63 | public static void ClearCookie()
64 | {
65 | var now = DateTime.Now;
66 |
67 | var cookie = new HttpCookie(CookieKey, null)
68 | {
69 | Expires = now.AddDays(-1)
70 | };
71 |
72 | HttpContext.Current.Response.Cookies.Add(cookie);
73 | }
74 | }
75 | }
--------------------------------------------------------------------------------
/web/Helpers/FileHelper.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System;
21 | using System.IO;
22 | using System.Net;
23 | using System.Web;
24 | using OneClickInstallation.Models;
25 | using OneClickInstallation.Resources;
26 |
27 | namespace OneClickInstallation.Helpers
28 | {
29 | public class FileHelper
30 | {
31 | private const string DataFolder = "~/App_Data/";
32 |
33 | private const string TmpFolder = "tmp";
34 |
35 | public static string SaveFile(HttpPostedFileBase file)
36 | {
37 | if (file == null)
38 | throw new Exception(OneClickCommonResource.ErrorFileIsNull);
39 |
40 | if (file.ContentLength <= 0 || Settings.MaxFileSize < file.ContentLength)
41 | throw new Exception(OneClickCommonResource.ErrorFileSize);
42 |
43 | var fileName = Path.GetFileName(file.FileName);
44 |
45 | if (fileName == null)
46 | throw new Exception(OneClickCommonResource.ErrorFileIsNull);
47 |
48 | var folderPath = HttpContext.Current.Server.MapPath(DataFolder + TmpFolder);
49 |
50 | if (!Directory.Exists(folderPath))
51 | Directory.CreateDirectory(folderPath);
52 |
53 | var filePath = Path.Combine(folderPath, fileName);
54 |
55 | var index = 1;
56 | var newFileName = fileName;
57 |
58 | while (File.Exists(filePath))
59 | {
60 | newFileName = string.Format("{0} ({1}){2}", Path.GetFileNameWithoutExtension(fileName), index++, Path.GetExtension(fileName));
61 | filePath = Path.Combine(folderPath, newFileName);
62 | }
63 |
64 | file.SaveAs(filePath);
65 |
66 | return newFileName;
67 | }
68 |
69 | public static string SaveFile(string url)
70 | {
71 | if (string.IsNullOrEmpty(url))
72 | throw new Exception(OneClickCommonResource.ErrorFileIsNull);
73 |
74 | var uri = new Uri(url);
75 |
76 | var fileName = Path.GetFileName(uri.LocalPath);
77 |
78 | if (string.IsNullOrEmpty(fileName))
79 | throw new Exception(OneClickCommonResource.ErrorFileIsNull);
80 |
81 | var folderPath = HttpContext.Current.Server.MapPath(DataFolder + TmpFolder);
82 |
83 | if (!Directory.Exists(folderPath))
84 | Directory.CreateDirectory(folderPath);
85 |
86 | var filePath = Path.Combine(folderPath, fileName);
87 |
88 | var index = 1;
89 | var newFileName = fileName;
90 |
91 | while (File.Exists(filePath))
92 | {
93 | newFileName = string.Format("{0} ({1}){2}", Path.GetFileNameWithoutExtension(fileName), index++, Path.GetExtension(fileName));
94 | filePath = Path.Combine(folderPath, newFileName);
95 | }
96 |
97 | using (var client = new WebClient())
98 | {
99 | client.DownloadFile(uri, filePath);
100 | }
101 |
102 | return newFileName;
103 | }
104 |
105 | public static string GetTmpFileVirtualPath(string fileName)
106 | {
107 | return DataFolder + TmpFolder + "/" + fileName;
108 | }
109 |
110 | public static string GetFile(string fileName)
111 | {
112 | var filePath = Path.Combine(HttpContext.Current.Server.MapPath(DataFolder + TmpFolder), fileName);
113 |
114 | if (File.Exists(filePath)) return filePath;
115 |
116 | throw new Exception(OneClickCommonResource.ErrorFileNotFound);
117 | }
118 |
119 | public static void RemoveFile(string filePath)
120 | {
121 | if (!File.Exists(filePath))
122 | throw new Exception(OneClickCommonResource.ErrorFileNotFound);
123 |
124 | File.Delete(filePath);
125 | }
126 |
127 | public static void CreateLogFile(string userId, InstallationProgressModel progressModel)
128 | {
129 | var fileName = "InstallSuccess.log";
130 | var content = progressModel.ProgressText;
131 |
132 | if (!string.IsNullOrEmpty(progressModel.ErrorMessage))
133 | {
134 | fileName = "InstallError.log";
135 | content = progressModel.ErrorMessage;
136 | }
137 |
138 | if (string.IsNullOrEmpty(userId))
139 | userId = TmpFolder;
140 |
141 | var folderPath = HttpContext.Current.Server.MapPath(DataFolder + userId);
142 |
143 | if (!Directory.Exists(folderPath))
144 | Directory.CreateDirectory(folderPath);
145 |
146 | var filePath = Path.Combine(folderPath, fileName);
147 |
148 | using (var sw = new StreamWriter(filePath, true))
149 | {
150 | sw.WriteLine();
151 | sw.WriteLine(DateTime.Now.ToLongDateString());
152 | sw.WriteLine(DateTime.Now.ToLongTimeString());
153 | sw.Write(content);
154 | sw.Close();
155 | }
156 | }
157 | }
158 | }
--------------------------------------------------------------------------------
/web/Helpers/LangHelper.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System.Globalization;
21 |
22 | namespace OneClickInstallation.Helpers
23 | {
24 | public class LangHelper
25 | {
26 | public const string DefaultLanguage = "en";
27 |
28 | public static string[] GetLanguages()
29 | {
30 | return Settings.Languages.Split(',');
31 | }
32 |
33 | public static string GetLangTitle(string cultureName)
34 | {
35 | var culture = new CultureInfo(cultureName);
36 | return GetLangTitle(culture);
37 | }
38 |
39 | public static string GetLangTitle(CultureInfo culture)
40 | {
41 | return culture.NativeName.Substring(0, 1).ToUpper() + culture.NativeName.Substring(1);
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/web/Helpers/Settings.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System.ComponentModel;
21 | using System.Web.Configuration;
22 |
23 | namespace OneClickInstallation.Helpers
24 | {
25 | public class Settings
26 | {
27 | public static bool DebugMode
28 | {
29 | get
30 | {
31 | #if DEBUG
32 | return true;
33 | #else
34 | return false;
35 | #endif
36 | }
37 | }
38 |
39 |
40 | public static string Languages
41 | {
42 | get { return GetAppSettings("languages", "en,de,fr,es,ru,lv,it"); }
43 | }
44 |
45 | public static bool ResourcesFromDataBase
46 | {
47 | get { return GetAppSettings("resources.from-db", true); }
48 | }
49 |
50 | public static int MaxFileSize
51 | {
52 | get { return GetAppSettings("maxFileSize", 1048576); }
53 | }
54 |
55 |
56 | public static string AnalyticsFileUrl
57 | {
58 | get { return GetAppSettings("analyticsFileUrl", string.Empty); }
59 | }
60 |
61 | public static string TermsFileUrl
62 | {
63 | get { return GetAppSettings("termsFileUrl", string.Empty); }
64 | }
65 |
66 | public static string SourceUrl
67 | {
68 | get { return GetAppSettings("sourceUrl", string.Empty); }
69 | }
70 |
71 | public static string DevUrl
72 | {
73 | get { return GetAppSettings("devUrl", string.Empty); }
74 | }
75 |
76 | public static string HelpUrl
77 | {
78 | get { return GetAppSettings("helpUrl", string.Empty); }
79 | }
80 |
81 | public static string LicenseUrl
82 | {
83 | get { return GetAppSettings("licenseUrl", string.Empty); }
84 | }
85 |
86 |
87 | public static string DockerCommunityContainerName
88 | {
89 | get { return GetAppSettings("docker.community-container-name", "onlyoffice-community-server"); }
90 | }
91 |
92 | public static string DockerDocumentContainerName
93 | {
94 | get { return GetAppSettings("docker.document-container-name", "onlyoffice-document-server"); }
95 | }
96 |
97 | public static string DockerMailContainerName
98 | {
99 | get { return GetAppSettings("docker.mail-container-name", "onlyoffice-mail-server"); }
100 | }
101 |
102 | public static string DockerControlPanelContainerName
103 | {
104 | get { return GetAppSettings("docker.controlpanel-container-name", "onlyoffice-control-panel"); }
105 | }
106 |
107 |
108 | public static string DockerCommunityImageName
109 | {
110 | get { return GetAppSettings("docker.community-image-name", "onlyoffice/communityserver"); }
111 | }
112 |
113 | public static string DockerDocumentImageName
114 | {
115 | get { return GetAppSettings("docker.document-image-name", "onlyoffice/documentserver"); }
116 | }
117 |
118 | public static string DockerMailImageName
119 | {
120 | get { return GetAppSettings("docker.mail-image-name", "onlyoffice/mailserver"); }
121 | }
122 |
123 | public static string DockerControlPanelImageName
124 | {
125 | get { return GetAppSettings("docker.controlpanel-image-name", "onlyoffice/controlpanel"); }
126 | }
127 |
128 |
129 | public static string DockerEnterpriseCommunityImageName
130 | {
131 | get { return GetAppSettings("docker.enterprise.community-image-name", "onlyoffice4enterprise/communityserver-ee"); }
132 | }
133 |
134 | public static string DockerEnterpriseDocumentImageName
135 | {
136 | get { return GetAppSettings("docker.enterprise.document-image-name", "onlyoffice4enterprise/documentserver-ee"); }
137 | }
138 |
139 | public static string DockerEnterpriseMailImageName
140 | {
141 | get { return GetAppSettings("docker.enterprise.mail-image-name", "onlyoffice/mailserver"); }
142 | }
143 |
144 | public static string DockerEnterpriseControlPanelImageName
145 | {
146 | get { return GetAppSettings("docker.enterprise.controlpanel-image-name", "onlyoffice4enterprise/controlpanel-ee"); }
147 | }
148 |
149 |
150 | public static string DockerHubLoginUrl
151 | {
152 | get { return GetAppSettings("dockerhub.loginUrl", "https://hub.docker.com/v2/users/login/"); }
153 | }
154 |
155 | public static string DockerHubTagsUrlFormat
156 | {
157 | get { return GetAppSettings("dockerhub.tagsUrlFormat", "https://hub.docker.com/v2/repositories/{0}/tags/"); }
158 | }
159 |
160 | public static string DockerHubUserName
161 | {
162 | get { return GetAppSettings("dockerhub.userName", string.Empty); }
163 | }
164 |
165 | public static string DockerHubPassword
166 | {
167 | get { return GetAppSettings("dockerhub.password", string.Empty); }
168 | }
169 |
170 |
171 | public static string CacheKey
172 | {
173 | get { return GetAppSettings("cacheKey", string.Empty); }
174 | }
175 |
176 |
177 | public const string RemoteServerDir = "/app/onlyoffice";
178 |
179 | public const string TrialFileName = "trial.lic";
180 |
181 | public const string InstallationStopPattern = "INSTALLATION-STOP";
182 | public const string InstallationSuccessPattern = "INSTALLATION-STOP-SUCCESS";
183 | public const string InstallationErrorPattern = "INSTALLATION-STOP-ERROR";
184 |
185 |
186 | private static T GetAppSettings(string key, T defaultValue)
187 | {
188 | var configSetting = WebConfigurationManager.AppSettings[key];
189 | if (!string.IsNullOrEmpty(configSetting))
190 | {
191 | var converter = TypeDescriptor.GetConverter(typeof(T));
192 | if (converter.CanConvertFrom(typeof(string)))
193 | {
194 | return (T)converter.ConvertFromString(configSetting);
195 | }
196 | }
197 | return defaultValue;
198 | }
199 | }
200 | }
--------------------------------------------------------------------------------
/web/Helpers/SshHelper.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System;
21 | using System.IO;
22 | using System.Threading;
23 | using System.Web;
24 | using OneClickInstallation.Classes;
25 | using OneClickInstallation.Models;
26 |
27 | namespace OneClickInstallation.Helpers
28 | {
29 | public class SshHelper
30 | {
31 | public static void StartInstallation(string userId, ConnectionSettingsModel connectionSettings, InstallationComponentsModel installationComponents)
32 | {
33 | ThreadPool.QueueUserWorkItem(delegate(object state)
34 | {
35 | var workerState = state as WorkerState;
36 |
37 | if (workerState == null) return;
38 |
39 | HttpContext.Current = workerState.Context;
40 |
41 | using (var installationManager = new InstallationManager(workerState.UserId, workerState.ConnectionSettings, workerState.InstallationComponents))
42 | {
43 | installationManager.StartInstallation();
44 | }
45 | }, new WorkerState
46 | {
47 | Context = HttpContext.Current,
48 | ConnectionSettings = connectionSettings,
49 | InstallationComponents = installationComponents,
50 | UserId = userId
51 | });
52 |
53 | }
54 |
55 | public static Tuple Connect(string userId, ConnectionSettingsModel connectionSettings)
56 | {
57 | using (var installationManager = new InstallationManager(userId, connectionSettings))
58 | {
59 | return installationManager.Connect();
60 | }
61 | }
62 |
63 | public static void WarmingUp(string host)
64 | {
65 | var exitTime = DateTime.Now.AddMinutes(3);
66 |
67 | var uriString = host.StartsWith("http") ? host : "http://" + host;
68 |
69 | while (true)
70 | {
71 | if (DateTime.Now > exitTime)
72 | break;
73 |
74 | try
75 | {
76 | var req = System.Net.WebRequest.Create(uriString);
77 |
78 | req.Method = "GET";
79 |
80 | using (var resp = req.GetResponse())
81 | {
82 | using (var stream = resp.GetResponseStream())
83 | {
84 | if (stream == null) return;
85 |
86 | var sr = new StreamReader(stream);
87 | var output = sr.ReadToEnd();
88 |
89 | if (!string.IsNullOrEmpty(output))
90 | break;
91 |
92 | sr.Close();
93 | }
94 | }
95 | }
96 | catch (Exception)
97 | {
98 | }
99 |
100 | Thread.Sleep(1000);
101 | }
102 | }
103 |
104 | private class WorkerState
105 | {
106 | public HttpContext Context { get; set; }
107 | public ConnectionSettingsModel ConnectionSettings { get; set; }
108 | public InstallationComponentsModel InstallationComponents { get; set; }
109 | public string UserId { get; set; }
110 | }
111 | }
112 | }
--------------------------------------------------------------------------------
/web/Helpers/TagHelper.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | using System;
21 | using System.Collections;
22 | using System.Collections.Generic;
23 | using System.IO;
24 | using System.Linq;
25 | using System.Text;
26 | using Newtonsoft.Json;
27 | using OneClickInstallation.Classes;
28 | using OneClickInstallation.Models;
29 | using log4net;
30 |
31 | namespace OneClickInstallation.Helpers
32 | {
33 | public class TagHelper
34 | {
35 | public static InstallationComponentsModel InitializeAvailableTags(bool enterprise)
36 | {
37 | var available = new InstallationComponentsModel
38 | {
39 | CommunityServerVersion = GetLatestTagName(GetImageTags(enterprise ? Settings.DockerEnterpriseCommunityImageName : Settings.DockerCommunityImageName)),
40 | DocumentServerVersion = GetLatestTagName(GetImageTags(enterprise ? Settings.DockerEnterpriseDocumentImageName : Settings.DockerDocumentImageName)),
41 | MailServerVersion = GetLatestTagName(GetImageTags(enterprise ? Settings.DockerEnterpriseMailImageName : Settings.DockerMailImageName)),
42 | ControlPanelVersion = GetLatestTagName(GetImageTags(enterprise ? Settings.DockerEnterpriseControlPanelImageName : Settings.DockerControlPanelImageName)),
43 | };
44 |
45 | CacheHelper.SetAvailableComponents(enterprise, available);
46 |
47 | return available;
48 | }
49 |
50 | public static List GetImageTags(string imageName)
51 | {
52 | if (string.IsNullOrEmpty(imageName))
53 | throw new ArgumentNullException("imageName");
54 |
55 | try
56 | {
57 | var req = System.Net.WebRequest.Create(Settings.DockerHubLoginUrl);
58 |
59 | req.Method = "POST";
60 | req.ContentType = "application/json";
61 |
62 | var credentials = string.Empty;
63 |
64 | if (!string.IsNullOrEmpty(Settings.DockerHubUserName) && !string.IsNullOrEmpty(Settings.DockerHubPassword))
65 | credentials = JsonConvert.SerializeObject(new
66 | {
67 | username = Settings.DockerHubUserName,
68 | password = Settings.DockerHubPassword
69 | });
70 |
71 | var data = Encoding.ASCII.GetBytes(credentials);
72 |
73 | req.ContentLength = data.Length;
74 |
75 | using (var stream = req.GetRequestStream())
76 | {
77 | stream.Write(data, 0, data.Length);
78 | }
79 |
80 | string output;
81 |
82 | using (var resp = req.GetResponse())
83 | {
84 | using (var stream = resp.GetResponseStream())
85 | {
86 | if (stream == null) return null;
87 |
88 | var sr = new StreamReader(stream);
89 | output = sr.ReadToEnd();
90 | sr.Close();
91 | }
92 | }
93 |
94 | var token = string.Empty;
95 | dynamic obj;
96 |
97 | if (!string.IsNullOrEmpty(output))
98 | {
99 | obj = JsonConvert.DeserializeObject(output);
100 | token = obj.token;
101 | }
102 |
103 | req = System.Net.WebRequest.Create(string.Format(Settings.DockerHubTagsUrlFormat, imageName));
104 |
105 | req.Method = "GET";
106 |
107 | if(!string.IsNullOrEmpty(token))
108 | req.Headers.Add("Authorization", "JWT " + token);
109 |
110 | using (var resp = req.GetResponse())
111 | {
112 | using (var stream = resp.GetResponseStream())
113 | {
114 | if (stream == null) return null;
115 |
116 | var sr = new StreamReader(stream);
117 | output = sr.ReadToEnd();
118 | sr.Close();
119 | }
120 | }
121 |
122 | if (string.IsNullOrEmpty(output))
123 | return null;
124 |
125 | obj = JsonConvert.DeserializeObject(output);
126 | return ((IEnumerable) obj.results).Select(x => new ImageTag {Name = x.name}).ToList();
127 | }
128 | catch (Exception ex)
129 | {
130 | LogManager.GetLogger("ASC").Error(ex.Message, ex);
131 | return null;
132 | }
133 | }
134 |
135 | private static string GetLatestTagName(List imageTags)
136 | {
137 | if (imageTags == null || imageTags.Count == 0)
138 | return null;
139 |
140 | Version latest = null;
141 | var unparsed = new List();
142 |
143 | foreach (var imageTag in imageTags)
144 | {
145 | Version current;
146 | if (Version.TryParse(imageTag.Name, out current))
147 | {
148 | if (latest == null || current > latest)
149 | latest = current;
150 | }
151 | else
152 | {
153 | unparsed.Add(imageTag.Name);
154 | }
155 | }
156 |
157 | if (latest != null) return latest.ToString();
158 |
159 | if (unparsed.Any())
160 | {
161 | return unparsed.Contains("latest") ? "latest" : unparsed.First();
162 | }
163 |
164 | return null;
165 | }
166 |
167 | private static string BuildBasicAuth(string username, string password)
168 | {
169 | var authInfo = string.Format("{0}:{1}", username, password);
170 |
171 | return string.Format("Basic {0}", Convert.ToBase64String(Encoding.Default.GetBytes(authInfo)));
172 | }
173 | }
174 | }
--------------------------------------------------------------------------------
/web/Models/ConnectionSettingsModel.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | namespace OneClickInstallation.Models
21 | {
22 | public class ConnectionSettingsModel
23 | {
24 | public string Host { get; set; }
25 | public string UserName { get; set; }
26 | public string Password { get; set; }
27 | public string SshKey { get; set; }
28 | public string LicenseKey { get; set; }
29 | public bool Enterprise { get; set; }
30 | }
31 | }
--------------------------------------------------------------------------------
/web/Models/InstallationComponentsModel.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | namespace OneClickInstallation.Models
21 | {
22 | public class InstallationComponentsModel
23 | {
24 | public string CommunityServerVersion { get; set; }
25 | public string DocumentServerVersion { get; set; }
26 | public string MailServerVersion { get; set; }
27 | public string MailDomain { get; set; }
28 | public string ControlPanelVersion { get; set; }
29 | public bool LicenseFileExist { get; set; }
30 |
31 | public bool IsEmpty
32 | {
33 | get
34 | {
35 | return string.IsNullOrEmpty(CommunityServerVersion) &&
36 | string.IsNullOrEmpty(DocumentServerVersion) &&
37 | string.IsNullOrEmpty(MailServerVersion) &&
38 | string.IsNullOrEmpty(ControlPanelVersion);
39 | }
40 | }
41 |
42 | public bool IsFull
43 | {
44 | get
45 | {
46 | return !string.IsNullOrEmpty(CommunityServerVersion) &&
47 | !string.IsNullOrEmpty(DocumentServerVersion) &&
48 | !string.IsNullOrEmpty(MailServerVersion) &&
49 | !string.IsNullOrEmpty(ControlPanelVersion);
50 | }
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/web/Models/InstallationProgressModel.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | namespace OneClickInstallation.Models
21 | {
22 | public class InstallationProgressModel
23 | {
24 | public bool IsCompleted { get; set; }
25 | public string ProgressText { get; set; }
26 | public string ErrorMessage { get; set; }
27 | public InstallationProgressStep Step { get; set; }
28 | }
29 |
30 | public enum InstallationProgressStep
31 | {
32 | Start,
33 | UploadFiles,
34 | GetOsInfo,
35 | CheckPorts,
36 | InstallDocker,
37 | InstallDocumentServer,
38 | InstallMailServer,
39 | InstallControlPanel,
40 | InstallCommunityServer,
41 | WarmUp,
42 | End
43 | }
44 | }
--------------------------------------------------------------------------------
/web/Models/RequestInfoModel.cs:
--------------------------------------------------------------------------------
1 | /*
2 | *
3 | * (c) Copyright Ascensio System Limited 2010-2015
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing,
12 | * software distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and limitations under the License.
15 | *
16 | * You can contact Ascensio System SIA by email at sales@onlyoffice.com
17 | *
18 | */
19 |
20 | namespace OneClickInstallation.Models
21 | {
22 | public class RequestInfoModel
23 | {
24 | public string Name { get; set; }
25 | public string Email { get; set; }
26 | public string Phone { get; set; }
27 | public string CompanyName { get; set; }
28 | public int CompanySize { get; set; }
29 | public string Position { get; set; }
30 | }
31 | }
--------------------------------------------------------------------------------
/web/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("OneClickInstallation")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("Ascensio System SIA")]
12 | [assembly: AssemblyProduct("OneClickInstallation")]
13 | [assembly: AssemblyCopyright("Ascensio System SIA 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("e3e86fef-4072-4b8a-a8c4-187092dc4931")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Revision and Build Numbers
33 | // by using the '*' as shown below:
34 | [assembly: AssemblyVersion("1.0.0.0")]
35 | [assembly: AssemblyFileVersion("1.0.0.0")]
36 |
--------------------------------------------------------------------------------
/web/Resources/OneClickJsResource.resx:
--------------------------------------------------------------------------------
1 |
2 |
3 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 | text/microsoft-resx
110 |
111 |
112 | 2.0
113 |
114 |
115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
116 |
117 |
118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
119 |
120 |
121 | Currently only supports 64bit OS's
122 |
123 |
124 | Not supported OS
125 |
126 |
127 | The required ports are closed
128 |
129 |
130 | Please, set hostname for mail server
131 |
132 |
133 | Command sudo not found
134 |
135 |
136 | Error while installing docker
137 |
138 |
139 | Kernel version not supported
140 |
141 |
142 | To perform this action you must be logged in with root rights
143 |
144 |
145 | Cannot create trial license. Invalid input parameter.
146 |
147 |
148 | Cannot create trial license. An internal error is occured.
149 |
150 |
151 | Cannot create trial license. The hostname has been assigned to another email address.
152 |
153 |
154 | Invalid domain name
155 |
156 |
157 | Done
158 |
159 |
160 | Error
161 |
162 |
163 | In the process
164 |
165 |
166 | Please wait...
167 |
168 |
--------------------------------------------------------------------------------
/web/Scripts/jquery.blockUI.min.js:
--------------------------------------------------------------------------------
1 | (function(){"use strict";function n(n){function s(s,h){var rt,ut,p=s==window,l=h&&h.message!==undefined?h.message:undefined,g,k,d,tt,nt,w,b,it,ft,et,at;if(h=n.extend({},n.blockUI.defaults,h||{}),!h.ignoreIfBlocked||!n(s).data("blockUI.isBlocked")){if(h.overlayCSS=n.extend({},n.blockUI.defaults.overlayCSS,h.overlayCSS||{}),rt=n.extend({},n.blockUI.defaults.css,h.css||{}),h.onOverlayClick&&(h.overlayCSS.cursor="pointer"),ut=n.extend({},n.blockUI.defaults.themedCSS,h.themedCSS||{}),l=l===undefined?h.message:l,p&&t&&e(window,{fadeOut:0}),l&&typeof l!="string"&&(l.parentNode||l.jquery)&&(g=l.jquery?l[0]:l,k={},n(s).data("blockUI.history",k),k.el=g,k.parent=g.parentNode,k.display=g.style.display,k.position=g.style.position,k.parent&&k.parent.removeChild(g)),n(s).data("blockUI.onUnblock",h.onUnblock),d=h.baseZ,tt=f||h.forceIframe?n('