2016-01-26 20:18:51 +01:00
< a class = "btn btn-lg btn-default" href = "packaging_apps_en" > Application packaging< / a >
## Arguments management
#### Retrieve arguments in the install script from manifest
2016-06-23 15:39:39 +02:00
Arguments are given to the install script from the manifest in it's order. For instance, for Roundcube, `domain` and `path` arguments will respectively be retreived from environment variables or from `$1` and `$2` parameters in the install script.
2016-01-26 20:18:51 +01:00
```bash
# Retrieve arguments
2016-06-23 15:39:39 +02:00
domain=$YNH_APP_ARG_DOMAIN
path=$YNH_APP_ARG_PATH
2016-01-26 20:18:51 +01:00
```
#### Save arguments for other scripts
Remove, upgrade, backup and restore scripts could need arguments.
YunoHost could save arguments with this command which is generally used in the install script:
```bash
# Store config on YunoHost instance
2016-06-23 15:39:39 +02:00
ynh_app_setting_set $app domain $domain
2016-01-26 20:18:51 +01:00
```
Then, the script can retrieve saved arguments with this command:
```bash
2016-06-23 15:39:39 +02:00
domain=$(ynh_app_setting_get $app domain)
2016-01-26 20:18:51 +01:00
```
2016-02-10 17:04:59 +01:00
Those data are saved in `/etc/yunohost/apps/<app_name>/settings.yml` .