CAICP/system/help/locale/en/index.html
2018-11-22 21:02:44 +03:00

231 lines
10 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>CAI CP: Help</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../../css/help.css" type="text/css" />
</head>
<body>
<nav class="hidden">
<ul id="menu_toc">
<li id="mnu_start"><div class="div_toc mnu_selected">Tips and ticks</div><hr></li>
<li id="mnu_sys_req"><div class="div_toc mnu_selected">System requirements</div><hr></li>
<li id="mnu_setup"><div class="div_toc">Setting up</div><hr>
<ul>
<li id="mnu_security"><div class="div_toc">Security</div><hr></li>
</ul>
</li>
<li id="mnu_about"><div class="div_toc">About</div></li>
</ul>
</nav>
<article id="art_start" class="hidden">
<h1>Tips and ticks</h1>
<ul>
<li>Table witgets can be maximized by double click on header.</li>
<li>You can switch between information widgets blocks with
following hotkeys:
<ul>
<li><i>Ctrl + 1</i>: System</li>
<li><i>Ctrl + 2</i>: System pulse</li>
<li><i>Ctrl + 3</i>: Storage</li>
<li><i>Ctrl + 4</i>: Network</li>
<li><i>Ctrl + 5</i>: SMB</li>
<li><i>Ctrl + Left arrow</i>: Previous block</li>
<li><i>Ctrl + Right arrow</i>: Next block</li>
</ul>
Also You can use left or right swipe on header on devices
with touchscreen.
<hr>
<ul>
<li><i>Ctrl + F1</i>: This help</li>
</ul>
</li>
</ul>
</article>
<article id="art_sys_req" class="hidden">
<h1>System requirements</h1>
<p>Control panel core uses following commands and utilities:</p>
<ul>
<li>gawk (GNU awk)</li>
<li>grep</li>
<li>hddtemp</li>
<li>lsb-release</li>
<li>sed</li>
<li>smartmontools (smartctl)</li>
<li>sysstat (iostat)</li>
<li>php7</li>
</ul>
<p>
Applications may have other dependencies.
</p>
</article>
<article id="art_setup" class="hidden">
<h1>Setting up</h1>
<p>S.M.A.R.T. and HDD temperature monitoring widgets requires super
user priviledges. You need to add webserver account to sudoers.
Just run visudo command and add to User privilege specification
section next lines:
<pre>
wwwrun ALL=NOPASSWD: /usr/sbin/smartctl
wwwrun ALL=NOPASSWD: /usr/sbin/hddtemp
</pre>
</p>
<p>SMB monitoring widgets requires super user priveledges. You need
to add webserver account to sudoers. Just run visudo command and
add to User privilege specification section next lines:
<pre>
wwwrun ALL=NOPASSWD: /usr/bin/smbstatus
</pre>
</p>
<p>
Control panel configuration file is /system/json/settings.json.<br>
Available options:
<table class="tbl_wide">
<tr class="tbl_header">
<td>Option</td>
<td>Possible values</td>
<td>Description</td>
</tr>
<tr>
<td>lang</td>
<td>ru<br>en<br>...</td>
<td>Default languag. You can specify one of installed
languages.
</td>
</tr>
<tr>
<td>langs</td>
<td>"en" : "English"<br>
"ru" : "Русский"<br>
...
</td>
<td>Available languages.</td>
</tr>
<tr>
<td>dim_on_create</td>
<td>true<br>false</td>
<td>Widgets runs semi-transparent until data is loaded.</td>
</tr>
<tr>
<td>check_files_rights</td>
<td>true<br>false</td>
<td>Check files and directories rights on startup.</td>
</tr>
<tr>
<td>check_hdd_temp_interval</td>
<td>0 .. 86400</td>
<td>HDD temperature checking interval (in seconds).</td>
</tr>
<tr>
<td>check_smart_interval</td>
<td>0 .. 86400</td>
<td>HDD S.M.A.R.T checking interval (in seconds).</td>
</tr>
</table>
</p>
<p>
You can find applications list in /system/apps/apps.json.
Control panel checks dependencies and run applications if they
are ok. You can manually disable application by removing string
with it from this file.
</p>
</article>
<article id="art_security" class="hidden">
<h1>Security</h1>
<ol>
<li><p>You need to set owner to control panel files to wwwrun:www,
all directories and .sh files must have 550 mask, other
directories - 440 mask.</p>
<p>You need to set 640 mask to /system/json/settings.json if
You want to change some settings from WebUI.</p>
<p>You can set rights by executing following commands:<br>
<code>
$ chown -R wwwrun:www /path/to/base/dir<br>
$ chmod 440 $(find /path/to/base/dir -type f)<br>
$ chmod 550 $(find /path/to/base/dir -type d)<br>
$ chmod 550 $(find /path/to/base/dir -type f | grep .sh$)<br>
$ chmod 640 /path/to/base/dir/system/json/settings.json<br>
$ chmod 640 /path/to/base/dir/system/apps/apps.json
</code>
</p>
</li>
<li>Deny accss to .sh files by adding next options to
<pre><span><</span>Directory><span><</span>/Directory></pre>
block of Apache settings:
<pre>
<span><</span>FilesMatch "\.(sh)$">
Require all denied
<span><</span>/FilesMatch>
</pre>
</li>
<li>Set password to restrict access. Basic autorization example:
run Apache's utility htpasswd to generate password file
.htpasswd. Add next lines to Apache's config file into
<pre><span><</span>Directory><span><</span>/Directory></pre>
section:
<pre>
AuthName "Restricted zone"
AuthType Basic
AuthUserFile [Путь к файлу .htpasswd]
Require valid-user
</pre>
<p>Restart Apache.</p>
<p>
Attention! Basic authorization uses plain text to send
passwords. Consider to use HTTPS to avoid password leak.
</p>
</li>
<li><p>You need to add wwwrun user to sudoers if to enable
shutdown or reboot server functions. Be carefully with this
option!</p>
<p>Run <code># visudo</code> and add following line to
"User privilege specification":
<code>wwwrun ALL=NOPASSWD: /sbin/shutdown</code>
</p>
</li>
</ol>
</article>
<article id="art_about" class="hidden">
<h1>About</h1>
<div class="help_title">CAI CP</div>
<div class="help_ver">Version <span class="span_ver">_._</span>. Build date <span class="span_ver_date">__.__.____</span></div>
<div>Author: <span class="span_author_ru">Alexander Chebykin</span></div>
<div>License: MIT
<div id="div_license" class="scrollable">
<pre>
MIT License
-----------
Copyright (c) 2016-2017, Alexander I. Chebykin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
</pre>
</div>
</div>
<p>This product partially based on
<a href="https://github.com/afaqurk/linux-dash" target="_blank">
Linux Dash
</a> project.
</p>
</article>
<script src="../../js/help.js"></script>
</body>
</html>