mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Update Helpers
This commit is contained in:
parent
21433678f2
commit
0928b20320
1 changed files with 284 additions and 25 deletions
|
@ -411,7 +411,7 @@
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/apt#L244">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/apt#L265">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -1428,14 +1428,13 @@ ynh_exec_fully_quiet "your_command | other_command"</code>
|
|||
<div class="helper-card-body">
|
||||
<div data-toggle="collapse" href="#collapse-ynh_script_progression" style="cursor:pointer">
|
||||
<h5 class="helper-card-title"><tt>ynh_script_progression</tt></h5>
|
||||
<h6 class="helper-card-subtitle text-muted">Print a message as INFO and show progression during an app script</h6>
|
||||
<h6 class="helper-card-subtitle text-muted">Print a progress bar showing the progression of an app script</h6>
|
||||
</div>
|
||||
<div id="collapse-ynh_script_progression" class="collapse" role="tabpanel">
|
||||
<hr style="margin-top:25px; margin-bottom:25px;">
|
||||
<p>
|
||||
|
||||
<strong>Usage</strong>: <code class="helper-code helper-usage">ynh_script_progression --message=message [--weight=weight] [--time]
|
||||
The execution time is given for the duration since the previous call. So the weight should be applied to this previous call.</code>
|
||||
<strong>Usage</strong>: <code class="helper-code">ynh_script_progression --message=message [--weight=weight] [--time]</code>
|
||||
|
||||
</p>
|
||||
|
||||
|
@ -1452,7 +1451,7 @@ The execution time is given for the duration since the previous call. So the wei
|
|||
|
||||
|
||||
|
||||
<li><code>-t</code>, <code>--time=</code> : Print the execution time since the last call to this helper. Especially usefull to define weights.</li>
|
||||
<li><code>-t</code>, <code>--time=</code> : Print the execution time since the last call to this helper. Especially usefull to define weights. The execution time is given for the duration since the previous call. So the weight should be applied to this previous call.</li>
|
||||
|
||||
|
||||
|
||||
|
@ -1474,7 +1473,7 @@ The execution time is given for the duration since the previous call. So the wei
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logging#L224">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logging#L223">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -1511,7 +1510,7 @@ The execution time is given for the duration since the previous call. So the wei
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logging#L308">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logging#L307">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -1562,7 +1561,7 @@ The execution time is given for the duration since the previous call. So the wei
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logging#L319">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logging#L318">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -1610,7 +1609,7 @@ ynh_debug_exec "your_command | other_command"</code>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logging#L377">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logging#L376">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -1706,7 +1705,7 @@ ynh_debug_exec "your_command | other_command"</code>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logrotate#L99">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/logrotate#L102">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -3392,7 +3391,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/setting#L196">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/setting#L216">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -3451,7 +3450,267 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/setting#L218">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/setting#L238">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="helper-card">
|
||||
<div class="helper-card-body">
|
||||
<div data-toggle="collapse" href="#collapse-ynh_permission_create" style="cursor:pointer">
|
||||
<h5 class="helper-card-title"><tt>ynh_permission_create</tt></h5>
|
||||
<h6 class="helper-card-subtitle text-muted">Create a new permission for the app</h6>
|
||||
</div>
|
||||
<div id="collapse-ynh_permission_create" class="collapse" role="tabpanel">
|
||||
<hr style="margin-top:25px; margin-bottom:25px;">
|
||||
<p>
|
||||
|
||||
<strong>Usage</strong>: <code class="helper-code">ynh_permission_create --permission "permission" [--url "url"] [--allowed group1 group2]</code>
|
||||
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Arguments</strong>:
|
||||
<ul>
|
||||
|
||||
|
||||
<li><code>permission</code> : the name for the permission (by default a permission named "main" already exist)</li>
|
||||
|
||||
|
||||
|
||||
<li><code>url</code> : (optional) URL for which access will be allowed/forbidden</li>
|
||||
|
||||
|
||||
|
||||
<li><code>allowed</code> : (optional) A list of group/user to allow for the permission</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<strong>Example</strong>: <code class="helper-code">ynh_permission_create --permission admin --url /admin --allowed alice bob</code>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<strong>Details</strong>:
|
||||
<p>
|
||||
If provided, 'url' is assumed to be relative to the app domain/path if they</br>start with '/'. For example:</br> / -> domain.tld/app</br> /admin -> domain.tld/app/admin</br> domain.tld/app/api -> domain.tld/app/api</br></br>'url' can be later treated as a regex if it starts with "re:".</br>For example:</br> re:/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$</br> re:domain.tld/app/api/[A-Z]*$ -> domain.tld/app/api/[A-Z]*$</br></br>Requires YunoHost version 3.7.0 or higher.</br></br>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/setting#L272">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="helper-card">
|
||||
<div class="helper-card-body">
|
||||
<div data-toggle="collapse" href="#collapse-ynh_permission_delete" style="cursor:pointer">
|
||||
<h5 class="helper-card-title"><tt>ynh_permission_delete</tt></h5>
|
||||
<h6 class="helper-card-subtitle text-muted">Remove a permission for the app (note that when the app is removed all permission is automatically removed)</h6>
|
||||
</div>
|
||||
<div id="collapse-ynh_permission_delete" class="collapse" role="tabpanel">
|
||||
<hr style="margin-top:25px; margin-bottom:25px;">
|
||||
<p>
|
||||
|
||||
<strong>Usage</strong>: <code class="helper-code">ynh_permission_delete --permission "permission"</code>
|
||||
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Arguments</strong>:
|
||||
<ul>
|
||||
|
||||
|
||||
<li><code>permission</code> : the name for the permission (by default a permission named "main" is removed automatically when the app is removed)</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<strong>Example</strong>: <code class="helper-code">ynh_permission_delete --permission editors</code>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<strong>Details</strong>:
|
||||
<p>
|
||||
Requires YunoHost version 3.7.0 or higher.</br></br>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/setting#L300">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="helper-card">
|
||||
<div class="helper-card-body">
|
||||
<div data-toggle="collapse" href="#collapse-ynh_permission_exists" style="cursor:pointer">
|
||||
<h5 class="helper-card-title"><tt>ynh_permission_exists</tt></h5>
|
||||
<h6 class="helper-card-subtitle text-muted">Check if a permission exists</h6>
|
||||
</div>
|
||||
<div id="collapse-ynh_permission_exists" class="collapse" role="tabpanel">
|
||||
<hr style="margin-top:25px; margin-bottom:25px;">
|
||||
<p>
|
||||
|
||||
<strong>Usage</strong>: <code class="helper-code">ynh_permission_exists --permission=permission</code>
|
||||
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Arguments</strong>:
|
||||
<ul>
|
||||
|
||||
|
||||
<li><code>-p</code>, <code>--permission</code> : the permission to check</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<strong>Details</strong>:
|
||||
<p>
|
||||
Requires YunoHost version 3.7.0 or higher.</br></br>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/setting#L314">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="helper-card">
|
||||
<div class="helper-card-body">
|
||||
<div data-toggle="collapse" href="#collapse-ynh_permission_url" style="cursor:pointer">
|
||||
<h5 class="helper-card-title"><tt>ynh_permission_url</tt></h5>
|
||||
<h6 class="helper-card-subtitle text-muted">Redefine the url associated to a permission</h6>
|
||||
</div>
|
||||
<div id="collapse-ynh_permission_url" class="collapse" role="tabpanel">
|
||||
<hr style="margin-top:25px; margin-bottom:25px;">
|
||||
<p>
|
||||
|
||||
<strong>Usage</strong>: <code class="helper-code">ynh_permission_url --permission "permission" --url "url"</code>
|
||||
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Arguments</strong>:
|
||||
<ul>
|
||||
|
||||
|
||||
<li><code>permission</code> : the name for the permission (by default a permission named "main" is removed automatically when the app is removed)</li>
|
||||
|
||||
|
||||
|
||||
<li><code>url</code> : (optional) URL for which access will be allowed/forbidden</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<strong>Details</strong>:
|
||||
<p>
|
||||
Requires YunoHost version 3.7.0 or higher.</br></br>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/setting#L329">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="helper-card">
|
||||
<div class="helper-card-body">
|
||||
<div data-toggle="collapse" href="#collapse-ynh_permission_update" style="cursor:pointer">
|
||||
<h5 class="helper-card-title"><tt>ynh_permission_update</tt></h5>
|
||||
<h6 class="helper-card-subtitle text-muted">Update a permission for the app</h6>
|
||||
</div>
|
||||
<div id="collapse-ynh_permission_update" class="collapse" role="tabpanel">
|
||||
<hr style="margin-top:25px; margin-bottom:25px;">
|
||||
<p>
|
||||
|
||||
<strong>Usage</strong>: <code class="helper-code">ynh_permission_update --permission "permission" --add "group" ["group" ...] --remove "group" ["group" ...]</code>
|
||||
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>Arguments</strong>:
|
||||
<ul>
|
||||
|
||||
|
||||
<li><code>permission</code> : the name for the permission (by default a permission named "main" already exist)</li>
|
||||
|
||||
|
||||
|
||||
<li><code>add</code> : the list of group or users to enable add to the permission</li>
|
||||
|
||||
|
||||
|
||||
<li><code>remove</code> : the list of group or users to remove from the permission</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<strong>Example</strong>: <code class="helper-code">ynh_permission_update --permission admin --add samdoe --remove all_users Requires YunoHost version 3.7.0 or higher.</code>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/setting#L354">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4359,7 +4618,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L85">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L48">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4410,7 +4669,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L136">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L99">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4473,7 +4732,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L250">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L213">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4524,7 +4783,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L289">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L252">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4564,7 +4823,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L305">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L268">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4611,7 +4870,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L335">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L298">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4655,7 +4914,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L378">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L342">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4706,7 +4965,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L406">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L372">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4753,7 +5012,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L434">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L400">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4800,7 +5059,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L458">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L424">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4836,7 +5095,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
</p>
|
||||
|
||||
<p>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L488">Dude, show me the code !</a>
|
||||
<a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/data/helpers.d/utils#L454">Dude, show me the code !</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -4847,7 +5106,7 @@ Please always call this script in install and restore scripts</h6>
|
|||
|
||||
|
||||
|
||||
<p>Generated by <a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/doc/generate_helper_doc.py">this script</a> on 07/11/2019 (Yunohost version 3.6.4.3)</p>
|
||||
<p>Generated by <a href="https://github.com/YunoHost/yunohost/blob/stretch-unstable/doc/generate_helper_doc.py">this script</a> on 03/30/2020 (Yunohost version 3.7.0.12)</p>
|
||||
|
||||
|
||||
<style>
|
||||
|
@ -4876,4 +5135,4 @@ Please always call this script in install and restore scripts</h6>
|
|||
}
|
||||
/*===============================================*/
|
||||
|
||||
</style>
|
||||
</style>
|
Loading…
Reference in a new issue