diff --git a/manifest.toml b/manifest.toml index f05df7c..5aab7b1 100644 --- a/manifest.toml +++ b/manifest.toml @@ -23,7 +23,7 @@ cpe = "???" fund = "???" [integration] -yunohost = ">= 11.1.21" +yunohost = ">= 11.2" # FIXME: can be replaced by a list of supported archs using the dpkg --print-architecture nomenclature (amd64/i386/armhf/arm64), for example: ["amd64", "i386"] architectures = "all" multi_instance = true diff --git a/scripts/install b/scripts/install index a32496e..52d58ec 100755 --- a/scripts/install +++ b/scripts/install @@ -31,18 +31,13 @@ source /usr/share/yunohost/helpers # #================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST +# INITIALIZE AND STORE SETTINGS #================================================= -fpm_usage=low -fpm_footprint=low - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= - -ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage +# If you need to, you can define custom settings +# (or remove this section entirely if not relevant for you) +foo="bar" +ynh_app_setting_set --app=$app --key=foo --value=$foo #================================================= # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) @@ -70,7 +65,7 @@ ynh_script_progression --message="Adding system configurations related to $app.. ### `ynh_add_fpm_config` is used to set up a PHP config. ### You can remove it if your app doesn't use PHP. -### `ynh_add_fpm_config` will use the files conf/php-fpm.conf +### `ynh_add_fpm_config` will use the files conf/extra_php-fpm.conf ### If you're not using these lines: ### - You can remove these files in conf/. ### - Remove the section "BACKUP THE PHP-FPM CONFIGURATION" in the backup script @@ -79,8 +74,8 @@ ynh_script_progression --message="Adding system configurations related to $app.. ### with the reload at the end of the script. ### - And the section "PHP-FPM CONFIGURATION" in the upgrade script -# Create a dedicated PHP-FPM config using the conf/php-fpm.conf or conf/extra_php-fpm.conf -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +# Create a PHP-FPM config (with conf/extra_php-fpm.conf being appended to it) +ynh_add_fpm_config # Create a dedicated NGINX config using the conf/nginx.conf template ynh_add_nginx_config diff --git a/scripts/upgrade b/scripts/upgrade index 4d96413..a6b3f17 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -55,21 +55,6 @@ upgrade_type=$(ynh_check_app_version_changed) # ynh_app_setting_set --app=$app --key=install_dir --value=$install_dir #fi -### Use these functions if the package was released -### without "php fpm footprint" and you are implementing it -### Take values from 'install' script -#If fpm_footprint doesn't exist, create it -if [ -z "$fpm_footprint" ]; then - fpm_footprint=low - ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint -fi - -# If fpm_usage doesn't exist, create it -if [ -z "$fpm_usage" ]; then - fpm_usage=low - ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage -fi - #================================================= # STOP SYSTEMD SERVICE #================================================= @@ -103,7 +88,7 @@ ynh_script_progression --message="Upgrading system configurations related to $ap # This should be a literal copypasta of what happened in the install's "System configuration" section -ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint +ynh_add_fpm_config ynh_add_nginx_config