mirror of
https://github.com/YunoHost/doc.git
synced 2024-09-03 20:06:26 +02:00
Update packaging_apps_multiinstance.md
This commit is contained in:
parent
effeae856f
commit
22d2244fd2
1 changed files with 3 additions and 3 deletions
|
@ -1,14 +1,14 @@
|
||||||
<a class="btn btn-lg btn-default" href="packaging_apps_en">Application packaging</a>
|
<a class="btn btn-lg btn-default" href="packaging_apps_en">Application packaging</a>
|
||||||
|
|
||||||
### Multi-instance
|
### Multi-instance
|
||||||
Multi-instance is application capacity to be installed many times.
|
Multi-instance is application capacity to be installed several times.
|
||||||
|
|
||||||
#### Scripts
|
#### Scripts
|
||||||
When YunoHost install a second time the application, it give to the script at last argument `id__2` with the application `id` comming from the manifest. The value `n` in `id__n` is incremented at each new instance of the application.
|
When YunoHost installs the application a second time, it gives to the script, at last argument, `${id}__2` with the application `${id}` coming from the manifest. The value `n` in `${id}__n` is incremented each time a new instance of the application is installed.
|
||||||
|
|
||||||
**E.g.** in the roundcube script, database is called `roundcube`, the install directory `roundcube` and the [Nginx configuration](packaging_apps_nginx_conf_en) `roundcube`. This way, the second instance of roundcube will not conflict with the first one, and will be installed in the `roundcube__2` database, in the `roundcube__2`directory, and with the `roundcube__2` Nginx configuration.
|
**E.g.** in the roundcube script, database is called `roundcube`, the install directory `roundcube` and the [Nginx configuration](packaging_apps_nginx_conf_en) `roundcube`. This way, the second instance of roundcube will not conflict with the first one, and will be installed in the `roundcube__2` database, in the `roundcube__2`directory, and with the `roundcube__2` Nginx configuration.
|
||||||
|
|
||||||
Retrieve last variable gived to scripts:
|
Retrieve last variable given to scripts:
|
||||||
```bash
|
```bash
|
||||||
APP=${!#}
|
APP=${!#}
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue