1
0
mirror of https://github.com/ONLYOFFICE/OneClickInstall.git synced 2025-04-18 16:44:00 +03:00

update to v1.0.2

This commit is contained in:
Alexey Bannov 2015-11-06 18:22:25 +03:00
parent 9b24fe76fc
commit 6e7c7f92e0
19 changed files with 2140 additions and 1170 deletions

View File

@ -1,201 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

136
README.md
View File

@ -1,68 +1,68 @@
## ONLYOFFICE One Click Installation Overview
An ONLYOFFICE One Click Installation is used to automate the deployment process of ONLYOFFICE Free Edition using the Docker container technology.
ONLYOFFICE Free Edition is an open source software that comprises Document Server, Community Server and Mail Server,
all to resolve the collaboration issues for both small and medium-sized teams.
## How it works?
ONLYOFFICE One Click Installation service connects to a remote Linux machine via SSH (https://www.nuget.org/packages/SSH.NET/ or http://sshnet.codeplex.com/) 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:
The scripts are performing the following:
1. bash check-previous-version.sh
checking the already existing data
2. bash make-dir.sh "/app/onlyoffice"
creating the work directory (the folder all the necessary data will be copied to)
3. bash get-os-info.sh
getting the information about the currently used OS
4. bash check-ports.sh true
checking ports of the current computer (the **true** parameter is used to check whether port 25 for Mail Server is opened or not)
5. bash run-docker.sh "Ubuntu" "14.04" "x86_64" "3.13.0-36-generic" true
installing and running Docker
During the installation process to the computer reboot might be required after which the scripts will continue to run. To indicate that the restart was done, the afterReboot (true) parameter is used.
6. bash run-document-server.sh
installing Document Server
7. bash run-mail-server.sh "domainName"
installing Mail Server using the specified domain name
8. bash run-community-server.sh
installing Community Server and link it with Document Server and Mail Server, if selected
Before running each script two commands need to be executed:
chmod +x scriptPath
sed -i 's/\r$//' scriptPath
where scriptPath is the path to the script (e.g. /app/onlyoffice/setup/tools/check-ports.sh)
This is used to correct the document formatting (\n\r issues in different operating systems)
## Project Information
Official website: [http://one-click-install.onlyoffice.com](http://one-click-install.onlyoffice.com "http://one-click-install.onlyoffice.com")
Code repository: [https://github.com/ONLYOFFICE/OneClickInstall](https://github.com/ONLYOFFICE/OneClickInstall "https://github.com/ONLYOFFICE/OneClickInstall")
License: [Apache v.2.0](http://www.apache.org/licenses/LICENSE-2.0 "Apache v.2.0")
ONLYOFFICE SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.onlyoffice.com")
ONLYOFFICE Open Source version: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org")
## User Feedback and Support
If you have any problems with or questions about this installer, please contact us through a [dev.onlyoffice.org][1].
[1]: http://dev.onlyoffice.org
## ONLYOFFICE One Click Installation Overview
An ONLYOFFICE One Click Installation is used to automate the deployment process of ONLYOFFICE Free Edition using the Docker container technology.
ONLYOFFICE Free Edition is an open source software that comprises Document Server, Community Server and Mail Server,
all to resolve the collaboration issues for both small and medium-sized teams.
## How it works?
ONLYOFFICE One Click Installation service connects to a remote Linux machine via SSH (https://www.nuget.org/packages/SSH.NET/ or http://sshnet.codeplex.com/) 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:
The scripts are performing the following:
1. bash check-previous-version.sh
checking the already existing data
2. bash make-dir.sh "/app/onlyoffice"
creating the work directory (the folder all the necessary data will be copied to)
3. bash get-os-info.sh
getting the information about the currently used OS
4. bash check-ports.sh true
checking ports of the current computer (the **true** parameter is used to check whether port 25 for Mail Server is opened or not)
5. bash run-docker.sh "Ubuntu" "14.04" "x86_64" "3.13.0-36-generic" true
installing and running Docker
During the installation process to the computer reboot might be required after which the scripts will continue to run. To indicate that the restart was done, the afterReboot (true) parameter is used.
6. bash run-document-server.sh
installing Document Server
7. bash run-mail-server.sh "domainName"
installing Mail Server using the specified domain name
8. bash run-community-server.sh
installing Community Server and link it with Document Server and Mail Server, if selected
Before running each script two commands need to be executed:
chmod +x scriptPath
sed -i 's/\r$//' scriptPath
where scriptPath is the path to the script (e.g. /app/onlyoffice/setup/tools/check-ports.sh)
This is used to correct the document formatting (\n\r issues in different operating systems)
## Project Information
Official website: [http://one-click-install.onlyoffice.com](http://one-click-install.onlyoffice.com "http://one-click-install.onlyoffice.com")
Code repository: [https://github.com/ONLYOFFICE/OneClickInstall](https://github.com/ONLYOFFICE/OneClickInstall "https://github.com/ONLYOFFICE/OneClickInstall")
License: [Apache v.2.0](http://www.apache.org/licenses/LICENSE-2.0 "Apache v.2.0")
ONLYOFFICE SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.onlyoffice.com")
ONLYOFFICE Open Source version: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org")
## User Feedback and Support
If you have any problems with or questions about this installer, please contact us through a [dev.onlyoffice.org][1].
[1]: http://dev.onlyoffice.org

View File

@ -1,52 +1,52 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System.Web.Optimization;
namespace OneClickInstallation
{
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery.blockUI.js"));
bundles.Add(new ScriptBundle("~/bundles/homepage").Include(
"~/Scripts/common.js",
"~/Scripts/toastr.js",
"~/Scripts/install.js"));
bundles.Add(new Bundle("~/Content/less", new LessTransform(), new CssMinify()).Include(
"~/Content/vars.less",
"~/Content/layout.less",
"~/Content/header.less",
"~/Content/paragraph.less",
"~/Content/link.less",
"~/Content/list.less",
"~/Content/button.less",
"~/Content/form.less",
"~/Content/toastr.less",
"~/Content/action-menu.less",
"~/Content/lang-switcher.less",
"~/Content/site.less"));
}
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System.Web.Optimization;
namespace OneClickInstallation
{
public class BundleConfig
{
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
"~/Scripts/jquery-{version}.js",
"~/Scripts/jquery.blockUI.js"));
bundles.Add(new ScriptBundle("~/bundles/homepage").Include(
"~/Scripts/common.js",
"~/Scripts/toastr.js",
"~/Scripts/install.js"));
bundles.Add(new Bundle("~/Content/less", new LessTransform(), new CssMinify()).Include(
"~/Content/vars.less",
"~/Content/layout.less",
"~/Content/header.less",
"~/Content/paragraph.less",
"~/Content/link.less",
"~/Content/list.less",
"~/Content/button.less",
"~/Content/form.less",
"~/Content/toastr.less",
"~/Content/action-menu.less",
"~/Content/lang-switcher.less",
"~/Content/site.less"));
}
}
}

View File

@ -1,71 +1,71 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System.IO;
using System.Web.Hosting;
using System.Web.Optimization;
using dotless.Core;
using dotless.Core.Input;
using dotless.Core.configuration;
namespace OneClickInstallation
{
public class LessTransform : IBundleTransform
{
public void Process(BundleContext context, BundleResponse response)
{
var config = new DotlessConfiguration
{
MinifyOutput = true,
ImportAllFilesAsLess = true,
CacheEnabled = true,
LessSource = typeof (VirtualFileReader)
};
response.Content = Less.Parse(response.Content, config);
response.ContentType = "text/css";
}
}
internal sealed class VirtualFileReader : IFileReader
{
public byte[] GetBinaryFileContents(string fileName)
{
fileName = GetFullPath(fileName);
return File.ReadAllBytes(fileName);
}
public string GetFileContents(string fileName)
{
fileName = GetFullPath(fileName);
return File.ReadAllText(fileName);
}
public bool DoesFileExist(string fileName)
{
fileName = GetFullPath(fileName);
return File.Exists(fileName);
}
private static string GetFullPath(string path)
{
return HostingEnvironment.MapPath("~/Content/" + path);
}
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System.IO;
using System.Web.Hosting;
using System.Web.Optimization;
using dotless.Core;
using dotless.Core.Input;
using dotless.Core.configuration;
namespace OneClickInstallation
{
public class LessTransform : IBundleTransform
{
public void Process(BundleContext context, BundleResponse response)
{
var config = new DotlessConfiguration
{
MinifyOutput = true,
ImportAllFilesAsLess = true,
CacheEnabled = true,
LessSource = typeof (VirtualFileReader)
};
response.Content = Less.Parse(response.Content, config);
response.ContentType = "text/css";
}
}
internal sealed class VirtualFileReader : IFileReader
{
public byte[] GetBinaryFileContents(string fileName)
{
fileName = GetFullPath(fileName);
return File.ReadAllBytes(fileName);
}
public string GetFileContents(string fileName)
{
fileName = GetFullPath(fileName);
return File.ReadAllText(fileName);
}
public bool DoesFileExist(string fileName)
{
fileName = GetFullPath(fileName);
return File.Exists(fileName);
}
private static string GetFullPath(string path)
{
return HostingEnvironment.MapPath("~/Content/" + path);
}
}
}

View File

@ -1,47 +1,47 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System;
using System.Web.Mvc;
using System.Web.Routing;
using OneClickInstallation.Helpers;
namespace OneClickInstallation
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Localisation",
"{lang}/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new { lang = String.Join("|", LangHelper.GetLanguages()) }
);
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System;
using System.Web.Mvc;
using System.Web.Routing;
using OneClickInstallation.Helpers;
namespace OneClickInstallation
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Localisation",
"{lang}/{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional },
new { lang = String.Join("|", LangHelper.GetLanguages()) }
);
routes.MapRoute(
"Default",
"{controller}/{action}/{id}",
new { controller = "Home", action = "Index", id = UrlParameter.Optional }
);
}
}
}

View File

@ -1,54 +1,54 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
.action-menu {
display: none;
position: absolute;
padding: 10px 20px 15px 15px;
z-index: 999;
background: #ffffff;
border: 1px solid #d1d1d1;
box-shadow: 1px 1px 8px #aaaaaa;
.action {
margin: 0 10px;
height: 24px;
line-height: 24px;
white-space: nowrap;
cursor: pointer;
a {
font-weight: normal;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
.corner {
background: url("images/corner_top.gif") no-repeat;
width: 7px;
height: 6px;
position: absolute;
top: -5px;
right: 16px;
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
.action-menu {
display: none;
position: absolute;
padding: 10px 20px 15px 15px;
z-index: 999;
background: #ffffff;
border: 1px solid #d1d1d1;
box-shadow: 1px 1px 8px #aaaaaa;
.action {
margin: 0 10px;
height: 24px;
line-height: 24px;
white-space: nowrap;
cursor: pointer;
a {
font-weight: normal;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
.corner {
background: url("images/corner_top.gif") no-repeat;
width: 7px;
height: 6px;
position: absolute;
top: -5px;
right: 16px;
}
}

View File

@ -1,47 +1,47 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
h1, h2, h3
{
padding: 0;
margin: 0;
}
h1
{
font-size: 24px;
font-weight: 100;
margin-bottom: 24px;
}
h2
{
font-size: 18px;
font-weight: 600;
margin-bottom: 24px;
}
h3
{
font-size: 16px;
font-weight: 100;
margin-bottom: 24px;
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
h1, h2, h3
{
padding: 0;
margin: 0;
}
h1
{
font-size: 24px;
font-weight: 100;
margin-bottom: 24px;
}
h2
{
font-size: 18px;
font-weight: 600;
margin-bottom: 24px;
}
h3
{
font-size: 16px;
font-weight: 100;
margin-bottom: 24px;
}

View File

@ -1,94 +1,94 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
.lang-switcher
{
display: inline-block;
float: right;
margin-top: 27px;
position: relative;
.switcher
{
padding-right: 15px;
background: url("images/combo_gray.png") right center no-repeat;
cursor: pointer;
.lang-title
{
height: 16px;
line-height: 16px;
span
{
border-bottom: 1px dotted #ffffff;
color: #ffffff;
}
}
}
a, .lang-title
{
background: url("images/flags.png") no-repeat;
padding-left: 25px;
&.en
{
background-position: left -14px;
}
&.de
{
background-position: left 2px;
}
&.fr
{
background-position: left -46px;
}
&.es
{
background-position: left -30px;
}
&.ru
{
background-position: left -94px;
}
&.lv
{
background-position: left -78px;
}
&.it
{
background-position: left -62px;
}
}
.action-menu
{
right: -16px;
top: 26px;
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
.lang-switcher
{
display: inline-block;
float: right;
margin-top: 27px;
position: relative;
.switcher
{
padding-right: 15px;
background: url("images/combo_gray.png") right center no-repeat;
cursor: pointer;
.lang-title
{
height: 16px;
line-height: 16px;
span
{
border-bottom: 1px dotted #ffffff;
color: #ffffff;
}
}
}
a, .lang-title
{
background: url("images/flags.png") no-repeat;
padding-left: 25px;
&.en
{
background-position: left -14px;
}
&.de
{
background-position: left 2px;
}
&.fr
{
background-position: left -46px;
}
&.es
{
background-position: left -30px;
}
&.ru
{
background-position: left -94px;
}
&.lv
{
background-position: left -78px;
}
&.it
{
background-position: left -62px;
}
}
.action-menu
{
right: -16px;
top: 26px;
}
}

View File

@ -1,96 +1,96 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
html, body
{
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
body
{
background-color: #ffffff;
color: #666666;
font-size: 13px;
font-family: "Open Sans", sans-serif, Arial;
}
.layout-wrapper
{
margin: 0;
min-height: 100%;
min-width: 960px;
padding: 0;
position: relative;
width: 100%;
}
.layout-header
{
background-color: #3d4a6b;
height: 72px;
margin: 0;
padding: 0;
width: 100%;
}
.layout-body
{
padding: 0 0 112px;
.layout-left-side
{
float: left;
margin: 0;
width: 280px;
}
.layout-right-side
{
float: right;
margin: 62px 0 0;
width: 620px;
}
}
.layout-footer
{
bottom: 0;
height: 72px;
left: 0;
margin: 0;
padding: 0;
position: absolute;
width: 100%;
.layout-content-wrapper
{
border-top: 1px solid #e0e0e0;
}
}
.layout-content-wrapper
{
margin: 0 auto;
width: 960px;
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
html, body
{
height: 100%;
margin: 0;
padding: 0;
width: 100%;
}
body
{
background-color: #ffffff;
color: #666666;
font-size: 13px;
font-family: "Open Sans", sans-serif, Arial;
}
.layout-wrapper
{
margin: 0;
min-height: 100%;
min-width: 960px;
padding: 0;
position: relative;
width: 100%;
}
.layout-header
{
background-color: #3d4a6b;
height: 72px;
margin: 0;
padding: 0;
width: 100%;
}
.layout-body
{
padding: 0 0 112px;
.layout-left-side
{
float: left;
margin: 0;
width: 280px;
}
.layout-right-side
{
float: right;
margin: 62px 0 0;
width: 620px;
}
}
.layout-footer
{
bottom: 0;
height: 72px;
left: 0;
margin: 0;
padding: 0;
position: absolute;
width: 100%;
.layout-content-wrapper
{
border-top: 1px solid #e0e0e0;
}
}
.layout-content-wrapper
{
margin: 0 auto;
width: 960px;
}

View File

@ -1,69 +1,69 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
a
{
color: #333333;
cursor: pointer;
text-decoration: none;
&:hover
{
text-decoration: underline;
}
&.selected
{
font-weight: bold;
}
&.underline
{
text-decoration: underline;
&:hover
{
text-decoration: none;
}
}
&.noline
{
text-decoration: none;
&:hover
{
text-decoration: none;
}
}
&.dotted
{
text-decoration: none;
border-bottom: 1px dotted;
&:hover
{
text-decoration: none;
border-bottom: medium none;
}
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
a
{
color: #333333;
cursor: pointer;
text-decoration: none;
&:hover
{
text-decoration: underline;
}
&.selected
{
font-weight: bold;
}
&.underline
{
text-decoration: underline;
&:hover
{
text-decoration: none;
}
}
&.noline
{
text-decoration: none;
&:hover
{
text-decoration: none;
}
}
&.dotted
{
text-decoration: none;
border-bottom: 1px dotted;
&:hover
{
text-decoration: none;
border-bottom: medium none;
}
}
}

View File

@ -1,46 +1,46 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
ul
{
margin: 0;
padding: 0;
}
li {
margin: 0;
padding: 0;
list-style: none;
}
ul.square-style-list {
margin: 0 0 0 48px;
li {
color: #de673c;
line-height: 24px;
list-style-type: square;
span {
color: #333333;
}
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
ul
{
margin: 0;
padding: 0;
}
li {
margin: 0;
padding: 0;
list-style: none;
}
ul.square-style-list {
margin: 0 0 0 48px;
li {
color: #de673c;
line-height: 24px;
list-style-type: square;
span {
color: #333333;
}
}
}

View File

@ -1,26 +1,26 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
p
{
padding: 0;
margin: 24px 0;
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
@import "vars";
p
{
padding: 0;
margin: 24px 0;
}

View File

@ -1,96 +1,96 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
.borderRadius(@size: 5px)
{
border-radius: @size;
}
.borderTopRadius(@radius: 5px) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
}
.borderBottomRadius(@radius: 5px) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
.boxShadow(@hShadow: 1px, @vShadow: 1px, @spread: 8px, @color: #aaaaaa)
{
-webkit-box-shadow: @hShadow @vShadow @spread @color;
-moz-box-shadow: @hShadow @vShadow @spread @color;
box-shadow: @hShadow @vShadow @spread @color;
}
.backgroundLinearGradient(@topColor, @bottomColor)
{
background: -webkit-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: -webkit-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: -moz-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: -ms-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: -o-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=@topColor, endColorstr=@bottomColor);
}
.textOverflow(@width)
{
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: @width;
}
.userSelect(@userSelect)
{
-webkit-touch-callout: @userSelect;
-webkit-user-select: @userSelect;
-khtml-user-select: @userSelect;
-moz-user-select: @userSelect;
-ms-user-select: @userSelect;
user-select: @userSelect;
}
.placeholder(@color, @fontSize)
{
&::-webkit-input-placeholder
{
color: @color;
font-size: @fontSize;
}
&::-moz-placeholder
{
color: @color;
font-size: @fontSize;
}
&:-moz-placeholder
{
color: @color;
font-size: @fontSize;
}
&:-ms-input-placeholder
{
color: @color;
font-size: @fontSize;
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
.borderRadius(@size: 5px)
{
border-radius: @size;
}
.borderTopRadius(@radius: 5px) {
border-top-right-radius: @radius;
border-top-left-radius: @radius;
}
.borderBottomRadius(@radius: 5px) {
border-bottom-right-radius: @radius;
border-bottom-left-radius: @radius;
}
.boxShadow(@hShadow: 1px, @vShadow: 1px, @spread: 8px, @color: #aaaaaa)
{
-webkit-box-shadow: @hShadow @vShadow @spread @color;
-moz-box-shadow: @hShadow @vShadow @spread @color;
box-shadow: @hShadow @vShadow @spread @color;
}
.backgroundLinearGradient(@topColor, @bottomColor)
{
background: -webkit-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: -webkit-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: -moz-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: -ms-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: -o-linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
background: linear-gradient(top, @topColor, @bottomColor) repeat scroll 0 0 @bottomColor;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=@topColor, endColorstr=@bottomColor);
}
.textOverflow(@width)
{
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
width: @width;
}
.userSelect(@userSelect)
{
-webkit-touch-callout: @userSelect;
-webkit-user-select: @userSelect;
-khtml-user-select: @userSelect;
-moz-user-select: @userSelect;
-ms-user-select: @userSelect;
user-select: @userSelect;
}
.placeholder(@color, @fontSize)
{
&::-webkit-input-placeholder
{
color: @color;
font-size: @fontSize;
}
&::-moz-placeholder
{
color: @color;
font-size: @fontSize;
}
&:-moz-placeholder
{
color: @color;
font-size: @fontSize;
}
&:-ms-input-placeholder
{
color: @color;
font-size: @fontSize;
}
}

967
web/Executables/install.sh Normal file
View File

@ -0,0 +1,967 @@
#/bin/bash
# (c) Copyright Ascensio System Limited 2010-2015
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and limitations under the License.
# You can contact Ascensio System SIA by email at sales@onlyoffice.com
COMMUNITY_CONTAINER_NAME="onlyoffice-community-server";
DOCUMENT_CONTAINER_NAME="onlyoffice-document-server";
MAIL_CONTAINER_NAME="onlyoffice-mail-server";
CONTROLPANEL_CONTAINER_NAME="onlyoffice-controlpanel";
COMMUNITY_IMAGE_NAME="onlyoffice/communityserver";
DOCUMENT_IMAGE_NAME="onlyoffice/documentserver";
MAIL_IMAGE_NAME="onlyoffice/mailserver";
CONTROLPANEL_IMAGE_NAME="onlyoffice/controlpanel";
COMMUNITY_VERSION="";
DOCUMENT_VERSION="";
MAIL_VERSION="";
CONTROLPANEL_VERSION="";
LICENSE_FILE_PATH="";
MAIL_DOMAIN_NAME="";
DIST="";
REV="";
KERNEL="";
AFTER_REBOOT="false";
UPDATE="false";
EMAIL="";
PASSWORD="";
USERNAME="";
INSTALL_COMMUNITY_SERVER="true"
INSTALL_DOCUMENT_SERVER="true"
INSTALL_MAIL_SERVER="true"
INSTALL_CONTROLPANEL="true"
PULL_COMMUNITY_SERVER="false"
PULL_DOCUMENT_SERVER="false"
PULL_MAIL_SERVER="false"
PULL_CONTROLPANEL="false"
while [ "$1" != "" ]; do
case $1 in
-cc | --communitycontainer )
if [ "$2" != "" ]; then
COMMUNITY_CONTAINER_NAME=$2
shift
fi
;;
-dc | --documentcontainer )
if [ "$2" != "" ]; then
DOCUMENT_CONTAINER_NAME=$2
shift
fi
;;
-mc | --mailcontainer )
if [ "$2" != "" ]; then
MAIL_CONTAINER_NAME=$2
shift
fi
;;
-cpc | --controlpanelcontainer )
if [ "$2" != "" ]; then
CONTROLPANEL_CONTAINER_NAME=$2
shift
fi
;;
-ci | --communityimage )
if [ "$2" != "" ]; then
COMMUNITY_IMAGE_NAME=$2
shift
fi
;;
-di | --documentimage )
if [ "$2" != "" ]; then
DOCUMENT_IMAGE_NAME=$2
shift
fi
;;
-mi | --mailimage )
if [ "$2" != "" ]; then
MAIL_IMAGE_NAME=$2
shift
fi
;;
-cpi | --controlpanelimage )
if [ "$2" != "" ]; then
CONTROLPANEL_IMAGE_NAME=$2
shift
fi
;;
-cv | --communityversion )
if [ "$2" != "" ]; then
COMMUNITY_VERSION=$2
shift
fi
;;
-dv | --documentversion )
if [ "$2" != "" ]; then
DOCUMENT_VERSION=$2
shift
fi
;;
-mv | --mailversion )
if [ "$2" != "" ]; then
MAIL_VERSION=$2
shift
fi
;;
-cpv | --controlpanelversion )
if [ "$2" != "" ]; then
CONTROLPANEL_VERSION=$2
shift
fi
;;
-lf | --licensefile )
if [ "$2" != "" ]; then
LICENSE_FILE_PATH=$2
shift
fi
;;
-md | --maildomain )
if [ "$2" != "" ]; then
MAIL_DOMAIN_NAME=$2
shift
fi
;;
-ar | --afterreboot )
if [ "$2" != "" ]; then
AFTER_REBOOT=$2
shift
fi
;;
-u | --update )
if [ "$2" != "" ]; then
UPDATE=$2
shift
fi
;;
-e | --email )
if [ "$2" != "" ]; then
EMAIL=$2
shift
fi
;;
-p | --password )
if [ "$2" != "" ]; then
PASSWORD=$2
shift
fi
;;
-un | --username )
if [ "$2" != "" ]; then
USERNAME=$2
shift
fi
;;
-ics | --installcommunityserver )
if [ "$2" != "" ]; then
INSTALL_COMMUNITY_SERVER=$2
shift
fi
;;
-ids | --installdocumentserver )
if [ "$2" != "" ]; then
INSTALL_DOCUMENT_SERVER=$2
shift
fi
;;
-ims | --installmailserver )
if [ "$2" != "" ]; then
INSTALL_MAIL_SERVER=$2
shift
fi
;;
-icp | --installcontrolpanel )
if [ "$2" != "" ]; then
INSTALL_CONTROLPANEL=$2
shift
fi
;;
-pcs | --pullcommunityserver )
if [ "$2" != "" ]; then
PULL_COMMUNITY_SERVER=$2
shift
fi
;;
-pds | --pulldocumentserver )
if [ "$2" != "" ]; then
PULL_DOCUMENT_SERVER=$2
shift
fi
;;
-pms | --pullmailserver )
if [ "$2" != "" ]; then
PULL_MAIL_SERVER=$2
shift
fi
;;
-pcp | --pullcontrolpanel )
if [ "$2" != "" ]; then
PULL_CONTROLPANEL=$2
shift
fi
;;
-? | -h | --help )
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
echo " Parameters:"
echo " -cc, --communitycontainer community container name"
echo " -dc, --documentcontainer document container name"
echo " -mc, --mailcontainer mail container name"
echo " -cpc, --controlpanelcontainer control panel container name"
echo " -ci, --communityimage community image name"
echo " -di, --documentimage document image name"
echo " -mi, --mailimage mail image name"
echo " -cpi, --controlpanelimage control panel image name"
echo " -cv, --communityversion community version"
echo " -dv, --documentversion document version"
echo " -mv, --mailversion mail version"
echo " -cpv, --controlpanelversion control panel version"
echo " -lf, --licensefile license file path"
echo " -md, --maildomain mail domail name"
echo " -ar, --afterreboot use to continue installation after reboot (true|false)"
echo " -u, --update use to update existing components (true|false)"
echo " -e, --email dockerhub email"
echo " -p, --password dockerhub password"
echo " -un, --username dockerhub username"
echo " -ics, --installcommunityserver install community server (true|false)"
echo " -ids, --installdocumentserver install document server (true|false)"
echo " -ims, --installmailserver install mail server (true|false)"
echo " -icp, --installcontrolpanel install control panel (true|false)"
echo " -pcs, --pullcommunityserver pull community server (true|false)"
echo " -pds, --pulldocumentserver pull document server (true|false)"
echo " -pms, --pullmailserver pull mail server (true|false)"
echo " -pcp, --pullcontrolpanel pull control panel (true|false)"
echo " -?, -h, --help this help"
echo
exit 0
;;
* )
echo "Unknown parameter $1" 1>&2
exit 0
;;
esac
shift
done
root_checking () {
if [ ! $( id -u ) -eq 0 ]; then
echo "To perform this action you must be logged in with root rights"
exit 0;
fi
}
command_exists () {
type "$1" &> /dev/null;
}
file_exists () {
if [ -z "$1" ]; then
echo "file path is empty"
exit 0;
fi
if [ -f "$1" ]; then
return 0; #true
else
return 1; #false
fi
}
install_sudo () {
if command_exists apt-get; then
apt-get install sudo
elif command_exists yum; then
yum install sudo
fi
if ! command_exists sudo; then
echo "command sudo not found"
exit 0;
fi
}
install_curl () {
if command_exists apt-get; then
sudo apt-get -y -q --force-yes install curl
elif command_exists yum; then
sudo yum -y install curl
fi
if ! command_exists curl; then
echo "command curl not found"
exit 0;
fi
}
to_lowercase () {
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
}
get_os_info () {
OS=`to_lowercase \`uname\``
if [ "${OS}" == "windowsnt" ]; then
echo "Not supported OS";
exit 0;
elif [ "${OS}" == "darwin" ]; then
echo "Not supported OS";
exit 0;
else
OS=`uname`
if [ "${OS}" = "SunOS" ] ; then
echo "Not supported OS";
exit 0;
elif [ "${OS}" = "AIX" ] ; then
echo "Not supported OS";
exit 0;
elif [ "${OS}" = "Linux" ] ; then
MACH=`uname -m`
if [ "${MACH}" != "x86_64" ]; then
echo "Currently only supports 64bit OS's";
exit 0;
fi
KERNEL=`uname -r`
if [ -f /etc/redhat-release ] ; then
DIST=`cat /etc/redhat-release |sed s/\ release.*//`
REV=`cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//`
elif [ -f /etc/SuSE-release ] ; then
REV=`cat /etc/os-release | grep '^VERSION_ID' | awk -F= '{ print $2 }'`
DIST='SuSe'
elif [ -f /etc/debian_version ] ; then
REV=`cat /etc/debian_version`
DIST='Debian'
if [ -f /etc/lsb-release ] ; then
DIST=`cat /etc/lsb-release | grep '^DISTRIB_ID' | awk -F= '{ print $2 }'`
REV=`cat /etc/lsb-release | grep '^DISTRIB_RELEASE' | awk -F= '{ print $2 }'`
elif [[ -f /etc/lsb_release ]]; then
DIST=`lsb_release -a 2>&1 | grep 'Distributor ID:' | awk -F ":" '{print $2 }'`
REV=`lsb_release -a 2>&1 | grep 'Release:' | awk -F ":" '{print $2 }'`
fi
fi
fi
fi
}
check_kernel () {
if [[ -z ${KERNEL} ]]; then
echo "Not supported OS";
exit 0;
fi
}
check_ports () {
STR_PORTS="80, 443, 5222, 25, 143, 587"
ARRAY_PORTS=(${STR_PORTS//,/ })
for PORT in "${ARRAY_PORTS[@]}"
do
REGEXP=":$PORT$"
CHECK_RESULT=$(sudo netstat -lnp | awk '{print $4}' | grep $REGEXP)
if [[ $CHECK_RESULT != "" ]]; then
echo "The following ports must be open: $PORT"
exit 0;
fi
done
}
install_docker () {
EXIT_STATUS=-1;
EXIT_NOT_SUPPORTED_OS_STATUS=10;
REV_PARTS=(${REV//\./ });
REV=${REV_PARTS[0]};
if [ "${DIST}" == "Ubuntu" ]; then
if [ "${REV}" -ge "14" ]; then
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y -q --force-yes install curl
sudo curl -sSL https://get.docker.com/ | sh
elif [ "${REV}" -eq "13" ]; then
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y install linux-image-extra-`uname -r`
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb http://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get -y update
sudo apt-get -y install lxc-docker
elif [ "${REV}" -eq "12" ]; then
# install the backported kernel
sudo apt-get -y update
sudo apt-get -y -q --force-yes install linux-image-generic-lts-trusty
# reboot
if [ "${AFTER_REBOOT}" != "true" ] ; then
echo "Please reboot your computer and run installation once again with parameter '--afterreboot true'"
exit 0;
fi
sudo apt-get -y -q --force-yes update
sudo apt-get -y -q --force-yes install wget
sudo wget -qO- https://get.docker.com/ | sh
else
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
fi
elif [ "${DIST}" == "Debian" ]; then
if [ "${REV}" -ge "8" ]; then
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y -q --force-yes install curl
sudo curl -sSL https://get.docker.com/ | sh
elif [ "${REV}" -eq "7" ]; then
echo "deb http://http.debian.net/debian wheezy-backports main" >> /etc/apt/sources.list
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y -q --force-yes install curl
sudo apt-get -y -q --force-yes install -t wheezy-backports linux-image-amd64
# reboot
if [ "${AFTER_REBOOT}" != "true" ] ; then
echo "Please reboot your computer and run installation once again with parameter '--afterreboot true'"
exit 0;
fi
curl -sSL https://get.docker.com/ | sh
else
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
fi
elif [[ "${DIST}" == CentOS* ]] || [ "${DIST}" == "Red Hat Enterprise Linux Server" ]; then
if [ "${REV}" -ge "7" ]; then
if [ "${DIST}" == "Red Hat Enterprise Linux Server" ]; then
sudo yum -y install yum-utils
sudo yum-config-manager --enable rhui-REGION-rhel-server-extras
fi
sudo yum -y update
sudo yum -y upgrade
sudo yum -y install curl
sudo curl -O -sSL https://get.docker.com/rpm/1.7.1/centos-7/RPMS/x86_64/docker-engine-1.7.1-1.el7.centos.x86_64.rpm
sudo yum -y localinstall --nogpgcheck docker-engine-1.7.1-1.el7.centos.x86_64.rpm
sudo rm docker-engine-1.7.1-1.el7.centos.x86_64.rpm
sudo service docker start
sudo systemctl start docker.service
sudo systemctl enable docker.service
elif [ "${REV}" -eq "6" ]; then
sudo yum -y update
sudo yum -y upgrade
sudo yum -y install curl
sudo curl -O -sSL https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm
sudo yum -y localinstall --nogpgcheck docker-engine-1.7.1-1.el6.x86_64.rpm
sudo rm docker-engine-1.7.1-1.el6.x86_64.rpm
sudo service docker start
sudo chkconfig docker on
else
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
fi
elif [ "${DIST}" == "SuSe" ]; then
if [ "${REV}" -ge "13" ]; then
sudo zypper ar -f http://download.opensuse.org/repositories/Virtualization/openSUSE_13.1/ Virtualization
sudo zypper --non-interactive in docker
sudo systemctl start docker
sudo systemctl enable docker
elif [ "${REV}" -ge "12" ]; then
sudo zypper ar -f http://download.opensuse.org/repositories/Virtualization/openSUSE_12.3/ Virtualization
sudo zypper --non-interactive in docker
sudo systemctl start docker
sudo systemctl enable docker
else
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
fi
elif [ "${DIST}" == "Fedora" ]; then
if [ "${REV}" -ge "22" ]; then
sudo yum -y update
sudo yum -y upgrade
sudo yum -y install curl
sudo curl -O -sSL https://get.docker.com/rpm/1.7.1/fedora-22/RPMS/x86_64/docker-engine-1.7.1-1.fc22.x86_64.rpm
sudo yum -y install --nogpgcheck docker-engine-1.7.1-1.fc22.x86_64.rpm
sudo rm docker-engine-1.7.1-1.fc22.x86_64.rpm
sudo service docker start
sudo systemctl start docker.service
sudo systemctl enable docker.service
elif [ "${REV}" -ge "21" ]; then
sudo yum -y update
sudo yum -y upgrade
sudo yum -y install curl
sudo curl -O -sSL https://get.docker.com/rpm/1.7.1/fedora-21/RPMS/x86_64/docker-engine-1.7.1-1.fc21.x86_64.rpm
sudo yum -y localinstall --nogpgcheck docker-engine-1.7.1-1.fc21.x86_64.rpm
sudo rm docker-engine-1.7.1-1.fc21.x86_64.rpm
sudo service docker start
sudo systemctl start docker.service
sudo systemctl enable docker.service
elif [ "${REV}" -eq "20" ]; then
sudo yum -y update
sudo yum -y upgrade
sudo yum -y install curl
sudo curl -O -sSL https://get.docker.com/rpm/1.7.1/fedora-20/RPMS/x86_64/docker-engine-1.7.1-1.fc20.x86_64.rpm
sudo yum -y localinstall --nogpgcheck docker-engine-1.7.1-1.fc20.x86_64.rpm
sudo rm docker-engine-1.7.1-1.fc20.x86_64.rpm
sudo service docker start
sudo systemctl start docker.service
sudo systemctl enable docker.service
else
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
fi
else
EXIT_STATUS=${EXIT_NOT_SUPPORTED_OS_STATUS};
fi
if [ ${EXIT_STATUS} -eq ${EXIT_NOT_SUPPORTED_OS_STATUS} ]; then
echo "Not supported OS"
exit 0;
fi
if ! command_exists docker ; then
echo "error while installing docker"
exit 0;
fi
}
docker_login () {
if [[ -n ${EMAIL} && -n ${PASSWORD} && -n ${USERNAME} ]]; then
sudo docker login -e ${EMAIL} -p ${PASSWORD} -u ${USERNAME}
fi
}
make_directories () {
sudo mkdir -p "/app/onlyoffice/setup";
sudo mkdir -p "/app/onlyoffice/DocumentServer/data";
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/FileConverterService";
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/CoAuthoringService";
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/DocService";
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/SpellCheckerService";
sudo mkdir -p "/app/onlyoffice/DocumentServer/logs/documentserver/LibreOfficeService";
sudo mkdir -p "/app/onlyoffice/MailServer/data/certs";
sudo mkdir -p "/app/onlyoffice/MailServer/logs";
sudo mkdir -p "/app/onlyoffice/MailServer/mysql";
sudo mkdir -p "/app/onlyoffice/CommunityServer/data";
sudo mkdir -p "/app/onlyoffice/CommunityServer/logs";
sudo mkdir -p "/app/onlyoffice/CommunityServer/mysql";
sudo mkdir -p "/app/onlyoffice/ControlPanel/data";
sudo mkdir -p "/app/onlyoffice/ControlPanel/logs";
sudo mkdir -p "/app/onlyoffice/ControlPanel/mysql";
sudo chmod 777 /app -R
}
copy_license () {
if [[ -n "${LICENSE_FILE_PATH}" ]]; then
if ! file_exists "${LICENSE_FILE_PATH}"; then
echo "License file is not exist";
exit 0;
fi
cp "${LICENSE_FILE_PATH}" "/app/onlyoffice/DocumentServer/data/license.lic";
cp "${LICENSE_FILE_PATH}" "/app/onlyoffice/MailServer/data/license.lic";
cp "${LICENSE_FILE_PATH}" "/app/onlyoffice/CommunityServer/data/license.lic";
cp "${LICENSE_FILE_PATH}" "/app/onlyoffice/ControlPanel/data/license.lic";
fi
}
get_available_version () {
if [[ -z "$1" ]]; then
echo "image name is empty";
exit 0;
fi
if ! command_exists curl ; then
install_curl;
fi
RUN_COMMAND="curl -s https://registry.hub.docker.com/v1/repositories/$1/tags";
if [[ -n ${EMAIL} && -n ${PASSWORD} ]]; then
RUN_COMMAND="$RUN_COMMAND --basic -u $EMAIL:$PASSWORD";
fi
listVersion=$(${RUN_COMMAND});
if [[ $listVersion != "["* ]]; then
echo "invalid version list";
exit 0;
fi
splitListVersion=$(echo $listVersion | tr -d '[]{},:"')
regex="[0-9]+\.[0-9]+\.[0-9]+"
versionList=""
for v in $splitListVersion
do
if [[ $v =~ $regex ]]; then
versionList="$v,$versionList"
fi
done
version=$(echo $versionList | tr ',' '\n' | sort -t. -k 1,1n -k 2,2n -k 3,3n | awk '/./{line=$0} END{print line}');
echo "$version"
}
check_bindings () {
if [[ -z "$1" ]]; then
echo "container id is empty";
exit 0;
fi
binds=$(sudo docker inspect --format='{{range $p,$conf:=.HostConfig.Binds}}{{$conf}};{{end}}' $1)
volumes=$(sudo docker inspect --format='{{range $p,$conf:=.Config.Volumes}}{{$p}};{{end}}' $1)
arrBinds=$(echo $binds | tr ";" "\n")
arrVolumes=$(echo $volumes | tr ";" "\n")
bindsCorrect=1
for volume in $arrVolumes
do
bindExist=0
for bind in $arrBinds
do
bind=($(echo $bind | tr ":" " "))
if [ "${bind[1]}" == "${volume}" ]; then
bindExist=1
fi
done
if [ "$bindExist" = "0" ]; then
bindsCorrect=0
echo "${volume} not binded"
fi
done
if [ "$bindsCorrect" = "0" ]; then
exit 0;
fi
}
install_document_server () {
DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
if [ "$UPDATE" == "true" ]; then
check_bindings $DOCUMENT_SERVER_ID;
sudo docker stop ${DOCUMENT_SERVER_ID};
sudo docker rm ${DOCUMENT_SERVER_ID};
else
echo "ONLYOFFICE DOCUMENT SERVER is already installed."
sudo docker start ${DOCUMENT_SERVER_ID};
fi
fi
if [[ -z ${DOCUMENT_VERSION} ]]; then
DOCUMENT_VERSION=$(get_available_version "$DOCUMENT_IMAGE_NAME");
fi
sudo docker run -i -t -d --restart=always --name ${DOCUMENT_CONTAINER_NAME} \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
${DOCUMENT_IMAGE_NAME}:${DOCUMENT_VERSION}
DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
if [[ -z ${DOCUMENT_SERVER_ID} ]]; then
echo "ONLYOFFICE DOCUMENT SERVER not installed."
exit 0;
fi
}
install_mail_server () {
MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
if [[ -n ${MAIL_SERVER_ID} ]]; then
if [ "$UPDATE" == "true" ]; then
check_bindings $MAIL_SERVER_ID;
sudo docker stop ${MAIL_SERVER_ID};
sudo docker rm ${MAIL_SERVER_ID};
else
echo "ONLYOFFICE MAIL SERVER is already installed."
sudo docker start ${MAIL_SERVER_ID};
fi
fi
if [[ -z ${MAIL_VERSION} ]]; then
MAIL_VERSION=$(get_available_version "$MAIL_IMAGE_NAME");
fi
if [ "$UPDATE" != "true" ]; then
if [[ -z ${MAIL_DOMAIN_NAME} ]]; then
echo "Please, set domain name for mail server"
exit 0;
fi
sudo docker run --privileged -i -t -d --restart=always --name ${MAIL_CONTAINER_NAME} -p 25:25 -p 143:143 -p 587:587 \
-v /app/onlyoffice/MailServer/data:/var/vmail \
-v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
-v /app/onlyoffice/MailServer/logs:/var/log -v \
/app/onlyoffice/MailServer/mysql:/var/lib/mysql -h ${MAIL_DOMAIN_NAME} ${MAIL_IMAGE_NAME}:${MAIL_VERSION}
else
sudo docker run --privileged -i -t -d --restart=always --name ${MAIL_CONTAINER_NAME} -p 25:25 -p 143:143 -p 587:587 \
-v /app/onlyoffice/MailServer/data:/var/vmail \
-v /app/onlyoffice/MailServer/data/certs:/etc/pki/tls/mailserver \
-v /app/onlyoffice/MailServer/logs:/var/log -v \
/app/onlyoffice/MailServer/mysql:/var/lib/mysql ${MAIL_IMAGE_NAME}:${MAIL_VERSION}
fi
MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
if [[ -z ${MAIL_SERVER_ID} ]]; then
echo "ONLYOFFICE MAIL SERVER not installed."
exit 0;
fi
}
install_controlpanel () {
CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
if [[ -n ${CONTROL_PANEL_ID} ]]; then
if [ "$UPDATE" == "true" ]; then
check_bindings $CONTROL_PANEL_ID;
OLD_CONTROLPANEL_CONTAINER_NAME="${CONTROLPANEL_CONTAINER_NAME}_$RANDOM";
sudo docker rename ${CONTROLPANEL_CONTAINER_NAME} ${OLD_CONTROLPANEL_CONTAINER_NAME};
else
echo "ONLYOFFICE CONTROL PANEL is already installed."
sudo docker start ${CONTROL_PANEL_ID};
fi
fi
if [[ -z ${CONTROLPANEL_VERSION} ]]; then
CONTROLPANEL_VERSION=$(get_available_version "$CONTROLPANEL_IMAGE_NAME");
fi
sudo docker run -i -t -d --restart=always --name ${CONTROLPANEL_CONTAINER_NAME} \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /app/onlyoffice/CommunityServer/data:/app/onlyoffice/CommunityServer/data \
-v /app/onlyoffice/DocumentServer/data:/app/onlyoffice/DocumentServer/data \
-v /app/onlyoffice/MailServer/data:/app/onlyoffice/MailServer/data \
-v /app/onlyoffice/ControlPanel/data:/var/www/onlyoffice-controlpanel/Data \
-v /app/onlyoffice/ControlPanel/logs:/var/log/onlyoffice-controlpanel \
-v /app/onlyoffice/ControlPanel/mysql:/var/lib/mysql \
${CONTROLPANEL_IMAGE_NAME}:${CONTROLPANEL_VERSION}
CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
if [[ -z ${CONTROL_PANEL_ID} ]]; then
echo "ONLYOFFICE CONTROL PANEL not installed."
exit 0;
fi
if [[ -n ${OLD_CONTROLPANEL_CONTAINER_NAME} ]]; then
docker rm -f ${OLD_CONTROLPANEL_CONTAINER_NAME}
fi
}
install_community_server () {
COMMUNITY_PORT=80
COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
DOCUMENT_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${DOCUMENT_CONTAINER_NAME});
MAIL_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${MAIL_CONTAINER_NAME});
CONTROL_PANEL_ID=$(sudo docker inspect --format='{{.Id}}' ${CONTROLPANEL_CONTAINER_NAME});
if [[ -n ${COMMUNITY_SERVER_ID} ]]; then
if [ "$UPDATE" == "true" ]; then
check_bindings $COMMUNITY_SERVER_ID;
COMMUNITY_PORT=$(sudo docker port $COMMUNITY_SERVER_ID 80 | sed 's/.*://')
sudo docker stop ${COMMUNITY_SERVER_ID};
sudo docker rm ${COMMUNITY_SERVER_ID};
else
echo "ONLYOFFICE COMMUNITY SERVER is already installed."
sudo docker start ${COMMUNITY_SERVER_ID};
fi
fi
RUN_COMMAND="sudo docker run --name $COMMUNITY_CONTAINER_NAME -i -t -d --restart=always -p $COMMUNITY_PORT:80 -p 443:443 -p 5222:5222";
if [[ -n ${DOCUMENT_SERVER_ID} ]]; then
RUN_COMMAND="$RUN_COMMAND --link $DOCUMENT_CONTAINER_NAME:document_server";
fi
if [[ -n ${MAIL_SERVER_ID} ]]; then
RUN_COMMAND="$RUN_COMMAND --link $MAIL_CONTAINER_NAME:mail_server";
fi
if [[ -n ${CONTROL_PANEL_ID} ]]; then
RUN_COMMAND="$RUN_COMMAND --link $CONTROLPANEL_CONTAINER_NAME:control_panel";
fi
if [[ -z ${COMMUNITY_VERSION} ]]; then
COMMUNITY_VERSION=$(get_available_version "$COMMUNITY_IMAGE_NAME");
fi
RUN_COMMAND="$RUN_COMMAND -v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data -v /app/onlyoffice/CommunityServer/mysql:/var/lib/mysql -v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice $COMMUNITY_IMAGE_NAME:$COMMUNITY_VERSION";
${RUN_COMMAND};
COMMUNITY_SERVER_ID=$(sudo docker inspect --format='{{.Id}}' ${COMMUNITY_CONTAINER_NAME});
if [[ -z ${COMMUNITY_SERVER_ID} ]]; then
echo "ONLYOFFICE COMMUNITY SERVER not installed."
exit 0;
fi
}
pull_document_server () {
if [[ -z ${DOCUMENT_VERSION} ]]; then
DOCUMENT_VERSION=$(get_available_version "$DOCUMENT_IMAGE_NAME");
fi
sudo docker pull ${DOCUMENT_IMAGE_NAME}:${DOCUMENT_VERSION}
}
pull_mail_server () {
if [[ -z ${MAIL_VERSION} ]]; then
MAIL_VERSION=$(get_available_version "$MAIL_IMAGE_NAME");
fi
sudo docker pull ${MAIL_IMAGE_NAME}:${MAIL_VERSION}
}
pull_controlpanel () {
if [[ -z ${CONTROLPANEL_VERSION} ]]; then
CONTROLPANEL_VERSION=$(get_available_version "$CONTROLPANEL_IMAGE_NAME");
fi
sudo docker pull ${CONTROLPANEL_IMAGE_NAME}:${CONTROLPANEL_VERSION}
}
pull_community_server () {
if [[ -z ${COMMUNITY_VERSION} ]]; then
COMMUNITY_VERSION=$(get_available_version "$COMMUNITY_IMAGE_NAME");
fi
sudo docker pull ${COMMUNITY_IMAGE_NAME}:${COMMUNITY_VERSION}
}
start_installation () {
root_checking
if ! command_exists sudo ; then
install_sudo;
fi
get_os_info
check_kernel
check_ports
if ! command_exists docker ; then
install_docker;
fi
docker_login
make_directories
copy_license
if [ "$INSTALL_DOCUMENT_SERVER" == "true" ]; then
install_document_server
elif [ "$PULL_DOCUMENT_SERVER" == "true" ]; then
pull_document_server
fi
if [ "$INSTALL_MAIL_SERVER" == "true" ]; then
install_mail_server
elif [ "$PULL_MAIL_SERVER" == "true" ]; then
pull_mail_server
fi
if [ "$INSTALL_CONTROLPANEL" == "true" ]; then
install_controlpanel
elif [ "$PULL_CONTROLPANEL" == "true" ]; then
pull_controlpanel
fi
if [ "$INSTALL_COMMUNITY_SERVER" == "true" ]; then
install_community_server
elif [ "$PULL_COMMUNITY_SERVER" == "true" ]; then
pull_community_server
fi
echo "Installation complete"
exit 0;
}
start_installation

View File

@ -1,75 +1,75 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System;
using System.Web;
using System.Web.Security;
namespace OneClickInstallation.Helpers
{
public class CookieHelper
{
private const string CookieKey = "ociuserid";
public static string GetCookie()
{
var cookie = HttpContext.Current.Request.Cookies[CookieKey];
if (cookie != null && !string.IsNullOrEmpty(cookie.Value))
{
var ticket = FormsAuthentication.Decrypt(cookie.Value);
if (ticket == null || ticket.Expired) return null;
return ticket.UserData;
}
return null;
}
public static void SetCookie(string value)
{
var now = DateTime.Now;
var ticket = new FormsAuthenticationTicket(1, CookieKey, now, now.AddDays(1), true, value);
var ticketKey = FormsAuthentication.Encrypt(ticket);
var cookie = new HttpCookie(CookieKey, ticketKey)
{
Expires = now.AddDays(1),
HttpOnly = true
};
HttpContext.Current.Response.Cookies.Add(cookie);
}
public static void ClearCookie()
{
var now = DateTime.Now;
var cookie = new HttpCookie(CookieKey, null)
{
Expires = now.AddDays(-1)
};
HttpContext.Current.Response.Cookies.Add(cookie);
}
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System;
using System.Web;
using System.Web.Security;
namespace OneClickInstallation.Helpers
{
public class CookieHelper
{
private const string CookieKey = "ociuserid";
public static string GetCookie()
{
var cookie = HttpContext.Current.Request.Cookies[CookieKey];
if (cookie != null && !string.IsNullOrEmpty(cookie.Value))
{
var ticket = FormsAuthentication.Decrypt(cookie.Value);
if (ticket == null || ticket.Expired) return null;
return ticket.UserData;
}
return null;
}
public static void SetCookie(string value)
{
var now = DateTime.Now;
var ticket = new FormsAuthenticationTicket(1, CookieKey, now, now.AddDays(1), true, value);
var ticketKey = FormsAuthentication.Encrypt(ticket);
var cookie = new HttpCookie(CookieKey, ticketKey)
{
Expires = now.AddDays(1),
HttpOnly = true
};
HttpContext.Current.Response.Cookies.Add(cookie);
}
public static void ClearCookie()
{
var now = DateTime.Now;
var cookie = new HttpCookie(CookieKey, null)
{
Expires = now.AddDays(-1)
};
HttpContext.Current.Response.Cookies.Add(cookie);
}
}
}

View File

@ -1,44 +1,44 @@
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System.Globalization;
namespace OneClickInstallation.Helpers
{
public class LangHelper
{
public const string DefaultLanguage = "en";
public static string[] GetLanguages()
{
return Settings.Languages.Split(',');
}
public static string GetLangTitle(string cultureName)
{
var culture = new CultureInfo(cultureName);
return GetLangTitle(culture);
}
public static string GetLangTitle(CultureInfo culture)
{
return culture.NativeName.Substring(0, 1).ToUpper() + culture.NativeName.Substring(1);
}
}
/*
*
* (c) Copyright Ascensio System Limited 2010-2015
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and limitations under the License.
*
* You can contact Ascensio System SIA by email at sales@onlyoffice.com
*
*/
using System.Globalization;
namespace OneClickInstallation.Helpers
{
public class LangHelper
{
public const string DefaultLanguage = "en";
public static string[] GetLanguages()
{
return Settings.Languages.Split(',');
}
public static string GetLangTitle(string cultureName)
{
var culture = new CultureInfo(cultureName);
return GetLangTitle(culture);
}
public static string GetLangTitle(CultureInfo culture)
{
return culture.NativeName.Substring(0, 1).ToUpper() + culture.NativeName.Substring(1);
}
}
}

View File

@ -247,6 +247,9 @@
<Content Include="Executables\tools\check-previous-version.sh" />
<Content Include="Executables\tools\make-dir.sh" />
</ItemGroup>
<ItemGroup>
<Content Include="Executables\install.sh" />
</ItemGroup>
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>

View File

@ -1,35 +1,35 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OneClickInstallation")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ascensio System SIA")]
[assembly: AssemblyProduct("OneClickInstallation")]
[assembly: AssemblyCopyright("Ascensio System SIA 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e3e86fef-4072-4b8a-a8c4-187092dc4931")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OneClickInstallation")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Ascensio System SIA")]
[assembly: AssemblyProduct("OneClickInstallation")]
[assembly: AssemblyCopyright("Ascensio System SIA 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("e3e86fef-4072-4b8a-a8c4-187092dc4931")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -1,61 +1,61 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta name="keywords" content="@OneClickCommonResource.MetaKeywords">
<meta name="description" content="@OneClickCommonResource.MetaDescription">
<title>@ViewBag.Title</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&amp;subset=latin,cyrillic-ext,cyrillic,latin-ext">
@Styles.Render("~/Content/less")
@if (!string.IsNullOrEmpty(Settings.AnalyticsFileUrl))
{
<script src="@Settings.AnalyticsFileUrl"></script>
}
</head>
<body>
<div class="layout-wrapper">
<div class="layout-header">
@Html.Partial("_HeaderPartial")
</div>
<div class="layout-body layout-content-wrapper clear-fix">
@if (IsSectionDefined("leftSide"))
{
<div class="layout-left-side">
@RenderSection("leftSide", false)
</div>
}
@if (IsSectionDefined("rightSide"))
{
<div class="layout-right-side">
@RenderSection("rightSide", false)
</div>
}
@RenderBody()
</div>
<div class="layout-footer">
@Html.Partial("_FooterPartial")
</div>
</div>
<script src="@Url.Action("Index", "Resource")"></script>
@Scripts.Render("~/bundles/jquery")
@RenderSection("scripts", false)
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<meta name="keywords" content="@OneClickCommonResource.MetaKeywords">
<meta name="description" content="@OneClickCommonResource.MetaDescription">
<title>@ViewBag.Title</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&amp;subset=latin,cyrillic-ext,cyrillic,latin-ext">
@Styles.Render("~/Content/less")
@if (!string.IsNullOrEmpty(Settings.AnalyticsFileUrl))
{
<script src="@Settings.AnalyticsFileUrl"></script>
}
</head>
<body>
<div class="layout-wrapper">
<div class="layout-header">
@Html.Partial("_HeaderPartial")
</div>
<div class="layout-body layout-content-wrapper clear-fix">
@if (IsSectionDefined("leftSide"))
{
<div class="layout-left-side">
@RenderSection("leftSide", false)
</div>
}
@if (IsSectionDefined("rightSide"))
{
<div class="layout-right-side">
@RenderSection("rightSide", false)
</div>
}
@RenderBody()
</div>
<div class="layout-footer">
@Html.Partial("_FooterPartial")
</div>
</div>
<script src="@Url.Action("Index", "Resource")"></script>
@Scripts.Render("~/bundles/jquery")
@RenderSection("scripts", false)
</body>
</html>