diff --git a/data/helpers.d/apt b/data/helpers.d/apt index 50db7613f..9e3f26b90 100644 --- a/data/helpers.d/apt +++ b/data/helpers.d/apt @@ -292,6 +292,8 @@ EOF # usage: ynh_add_app_dependencies --package=phpversion [--replace] # | arg: -p, --package= - Packages to add as dependencies for the app. # | arg: -r, --replace - Replace dependencies instead of adding to existing ones. +# +# Requires YunoHost version 3.8.1 or higher. ynh_add_app_dependencies () { # Declare an array to define the options of this helper. local legacy_args=pr @@ -338,6 +340,8 @@ ynh_remove_app_dependencies () { # | arg: -p, --package= - The packages to install from this extra repository # | arg: -k, --key= - url to get the public key. # | arg: -n, --name= - Name for the files for this repo, $app as default value. +# +# Requires YunoHost version 3.8.1 or higher. ynh_install_extra_app_dependencies () { # Declare an array to define the options of this helper. local legacy_args=rpkn @@ -376,6 +380,8 @@ ynh_install_extra_app_dependencies () { # | arg: -p, --priority= - Priority for the pin # | arg: -n, --name= - Name for the files for this repo, $app as default value. # | arg: -a, --append - Do not overwrite existing files. +# +# Requires YunoHost version 3.8.1 or higher. ynh_install_extra_repo () { # Declare an array to define the options of this helper. local legacy_args=rkpna @@ -445,6 +451,8 @@ ynh_install_extra_repo () { # # usage: ynh_remove_extra_repo [--name=name] # | arg: -n, --name= - Name for the files for this repo, $app as default value. +# +# Requires YunoHost version 3.8.1 or higher. ynh_remove_extra_repo () { # Declare an array to define the options of this helper. local legacy_args=n @@ -478,6 +486,7 @@ ynh_remove_extra_repo () { # uri suite component # ynh_add_repo --uri=http://forge.yunohost.org/debian/ --suite=stretch --component=stable # +# Requires YunoHost version 3.8.1 or higher. ynh_add_repo () { # Declare an array to define the options of this helper. local legacy_args=uscna @@ -518,6 +527,7 @@ ynh_add_repo () { # # See https://manpages.debian.org/stretch/apt/apt_preferences.5.en.html#How_APT_Interprets_Priorities for information about pinning. # +# Requires YunoHost version 3.8.1 or higher. ynh_pin_repo () { # Declare an array to define the options of this helper. local legacy_args=pirna diff --git a/data/helpers.d/backup b/data/helpers.d/backup index 9603ba525..a62f6c104 100644 --- a/data/helpers.d/backup +++ b/data/helpers.d/backup @@ -41,6 +41,7 @@ CAN_BIND=${CAN_BIND:-1} # # => "/etc/nginx/conf.d/$domain.d/$app.conf","apps/wordpress/conf/$app.conf" # # Requires YunoHost version 2.4.0 or higher. +# Requires YunoHost version 3.5.0 or higher for the argument --not_mandatory ynh_backup() { # TODO find a way to avoid injection by file strange naming ! @@ -224,6 +225,7 @@ with open(sys.argv[1], 'r') as backup_file: # /etc/nginx/conf.d/$domain.d/$app.conf # # Requires YunoHost version 2.6.4 or higher. +# Requires YunoHost version 3.5.0 or higher for the argument --not_mandatory ynh_restore_file () { # Declare an array to define the options of this helper. local legacy_args=odm diff --git a/data/helpers.d/hardware b/data/helpers.d/hardware index b46edcdd3..6702a8548 100644 --- a/data/helpers.d/hardware +++ b/data/helpers.d/hardware @@ -8,6 +8,8 @@ # | arg: -s, --ignore_swap - Ignore swap, consider only real RAM # | arg: -o, --only_swap - Ignore real RAM, consider only swap # | ret: the amount of free ram +# +# Requires YunoHost version 3.8.1 or higher. ynh_get_ram () { # Declare an array to define the options of this helper. local legacy_args=ftso @@ -74,6 +76,8 @@ ynh_get_ram () { # | arg: -s, --ignore_swap - Ignore swap, consider only real RAM # | arg: -o, --only_swap - Ignore real RAM, consider only swap # | exit: Return 1 if the ram is under the requirement, 0 otherwise. +# +# Requires YunoHost version 3.8.1 or higher. ynh_require_ram () { # Declare an array to define the options of this helper. local legacy_args=rftso diff --git a/data/helpers.d/logrotate b/data/helpers.d/logrotate index 7df954c15..d5384264c 100644 --- a/data/helpers.d/logrotate +++ b/data/helpers.d/logrotate @@ -16,6 +16,7 @@ # the same logrotate config file. Unless you use the option --non-append # # Requires YunoHost version 2.6.4 or higher. +# Requires YunoHost version 3.2.0 or higher for the argument --specific_user ynh_use_logrotate () { # Declare an array to define the options of this helper. local legacy_args=lnuya diff --git a/data/helpers.d/network b/data/helpers.d/network index 03df04c1e..cb5a9e540 100644 --- a/data/helpers.d/network +++ b/data/helpers.d/network @@ -33,7 +33,7 @@ ynh_find_port () { # | arg: -p, --port= - port to check # | exit: Return 1 if the port is already used by another process. # -# Requires YunoHost version 3.7.x or higher. +# Requires YunoHost version 3.8.0 or higher. ynh_port_available () { # Declare an array to define the options of this helper. local legacy_args=p diff --git a/data/helpers.d/nginx b/data/helpers.d/nginx index 6b60a3ef7..cd4380f16 100644 --- a/data/helpers.d/nginx +++ b/data/helpers.d/nginx @@ -19,6 +19,7 @@ # __PORT_2__ by $port_2 # # Requires YunoHost version 2.7.2 or higher. +# Requires YunoHost version 2.7.13 or higher for dynamic variables ynh_add_nginx_config () { finalnginxconf="/etc/nginx/conf.d/$domain.d/$app.conf" local others_var=${1:-} diff --git a/data/helpers.d/php b/data/helpers.d/php index 588bf7177..4ec011217 100644 --- a/data/helpers.d/php +++ b/data/helpers.d/php @@ -56,6 +56,8 @@ YNH_PHP_VERSION=${YNH_PHP_VERSION:-$YNH_DEFAULT_PHP_VERSION} # children ready to answer. # # Requires YunoHost version 2.7.2 or higher. +# Requires YunoHost version 3.5.1 or higher for the argument --phpversion +# Requires YunoHost version 3.8.1 or higher for the arguments --use_template, --usage, --footprint, --package and --dedicated_service ynh_add_fpm_config () { # Declare an array to define the options of this helper. local legacy_args=vtufpd @@ -312,6 +314,8 @@ ynh_remove_fpm_config () { # usage: ynh_install_php --phpversion=phpversion [--package=packages] # | arg: -v, --phpversion= - Version of php to install. # | arg: -p, --package= - Additionnal php packages to install +# +# Requires YunoHost version 3.8.1 or higher. ynh_install_php () { # Declare an array to define the options of this helper. local legacy_args=vp @@ -364,6 +368,8 @@ ynh_install_php () { # [internal] # # usage: ynh_install_php +# +# Requires YunoHost version 3.8.1 or higher. ynh_remove_php () { # Get the version of php used by this app local phpversion=$(ynh_app_setting_get $app phpversion) diff --git a/data/helpers.d/postgresql b/data/helpers.d/postgresql index 4122deec6..4ac9fcbec 100644 --- a/data/helpers.d/postgresql +++ b/data/helpers.d/postgresql @@ -153,6 +153,8 @@ ynh_psql_create_user() { # usage: ynh_psql_user_exists --user=user # | arg: -u, --user= - the user for which to check existence # | exit: Return 1 if the user doesn't exist, 0 otherwise +# +# Requires YunoHost version 3.5.0 or higher. ynh_psql_user_exists() { # Declare an array to define the options of this helper. local legacy_args=u @@ -174,6 +176,8 @@ ynh_psql_user_exists() { # usage: ynh_psql_database_exists --database=database # | arg: -d, --database= - the database for which to check existence # | exit: Return 1 if the database doesn't exist, 0 otherwise +# +# Requires YunoHost version 3.5.0 or higher. ynh_psql_database_exists() { # Declare an array to define the options of this helper. local legacy_args=d @@ -212,6 +216,7 @@ ynh_psql_drop_user() { # After executing this helper, the password of the created database will be available in $db_pwd # It will also be stored as "psqlpwd" into the app settings. # +# Requires YunoHost version 2.7.13 or higher. ynh_psql_setup_db() { # Declare an array to define the options of this helper. local legacy_args=unp @@ -239,6 +244,8 @@ ynh_psql_setup_db() { # usage: ynh_psql_remove_db --db_user=user --db_name=name # | arg: -u, --db_user= - Owner of the database # | arg: -n, --db_name= - Name of the database +# +# Requires YunoHost version 2.7.13 or higher. ynh_psql_remove_db() { # Declare an array to define the options of this helper. local legacy_args=un @@ -268,6 +275,8 @@ ynh_psql_remove_db() { # Please always call this script in install and restore scripts # # usage: ynh_psql_test_if_first_run +# +# Requires YunoHost version 2.7.13 or higher. ynh_psql_test_if_first_run() { if [ -f "$PSQL_ROOT_PWD_FILE" ] then diff --git a/data/helpers.d/systemd b/data/helpers.d/systemd index c718e50c2..5e67baf4d 100644 --- a/data/helpers.d/systemd +++ b/data/helpers.d/systemd @@ -14,7 +14,7 @@ # __APP__ by $app # __FINALPATH__ by $final_path # -# Requires YunoHost version 2.7.2 or higher. +# Requires YunoHost version 2.7.11 or higher. ynh_add_systemd_config () { # Declare an array to define the options of this helper. local legacy_args=st @@ -79,6 +79,8 @@ ynh_remove_systemd_config () { # | arg: -p, --log_path= - Log file - Path to the log file. Default : /var/log/$app/$app.log # | arg: -t, --timeout= - Timeout - The maximum time to wait before ending the watching. Default : 300 seconds. # | arg: -e, --length= - Length of the error log : Default : 20 +# +# Requires YunoHost version 3.5.0 or higher. ynh_systemd_action() { # Declare an array to define the options of this helper. local legacy_args=nalpte @@ -179,6 +181,8 @@ ynh_systemd_action() { # (usually used in ynh_clean_setup scripts) # # usage: ynh_clean_check_starting +# +# Requires YunoHost version 3.5.0 or higher. ynh_clean_check_starting () { if [ -n "$pid_tail" ] then diff --git a/data/helpers.d/user b/data/helpers.d/user index 304658ff8..08b1b1d42 100644 --- a/data/helpers.d/user +++ b/data/helpers.d/user @@ -78,6 +78,8 @@ ynh_system_user_exists() { # usage: ynh_system_group_exists --group=group # | arg: -g, --group= - the group to check # | exit: Return 1 if the group doesn't exist, 0 otherwise +# +# Requires YunoHost version 3.5.0.2 or higher. ynh_system_group_exists() { # Declare an array to define the options of this helper. local legacy_args=g diff --git a/data/helpers.d/utils b/data/helpers.d/utils index 13d3a5dcd..fb50305ce 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -16,6 +16,7 @@ # # It prints a warning to inform that the script was failed, and execute the ynh_clean_setup function if used in the app script # +# Requires YunoHost version 2.6.4 or higher. ynh_exit_properly () { local exit_code=$? if [ "$exit_code" -eq 0 ]; then