doc/packaging_apps_arguments_management.md
Pierre Ozoux 286efefcff typos
2016-02-10 16:04:59 +00:00

935 B

Application packaging

Arguments management

Retrieve arguments in the install script from manifest

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 $1 and $2 parameters in the install script.

# Retrieve arguments
domain=$1
path=$2

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:

# Store config on YunoHost instance
sudo yunohost app setting $app domain -v $domain

Then, the script can retrieve saved arguments with this command:

domain=$(sudo yunohost app setting $app domain)

Those data are saved in /etc/yunohost/apps/<app_name>/settings.yml.