diff --git a/check_process b/check_process index feb3cfc..36e8020 100644 --- a/check_process +++ b/check_process @@ -7,6 +7,16 @@ language="fr" market=1 is_public=1 (PUBLIC|public=1|private=0) + ; Actions + is_public=0|1 + ; Config_panel + main.is_public.is_public=0|1 + main.overwrite_files.overwrite_nginx=0|1 + main.overwrite_files.overwrite_phpfpm=0|1 + main.global_config.email_type=0|1 + main.php_fpm_config.footprint=low|medium|high + main.php_fpm_config.free_footprint=20 + main.php_fpm_config.usage=low|medium|high ; Checks pkg_linter=1 setup_sub_dir=1 @@ -21,6 +31,8 @@ incorrect_path=1 port_already_use=0 change_url=1 + actions=1 + config_panel=1 ;;; Levels Level 5=auto ;;; Options diff --git a/scripts/actions/public_private b/scripts/actions/public_private index ebe0cc8..2385e25 100755 --- a/scripts/actions/public_private +++ b/scripts/actions/public_private @@ -9,6 +9,13 @@ source scripts/_common.sh source /usr/share/yunohost/helpers +#================================================= +# MANAGE SCRIPT FAILURE +#================================================= + +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # RETRIEVE ARGUMENTS #================================================= diff --git a/scripts/config b/scripts/config index 3cc2691..8e28361 100644 --- a/scripts/config +++ b/scripts/config @@ -95,13 +95,16 @@ apply_config() { # MODIFY PUBLIC ACCESSIBILITY #================================================= - # Change public accessibility - if [ $is_public -eq 1 ] - then - yunohost app action run $app public_private --args is_public=1 - else - yunohost app action run $app public_private --args is_public=0 - fi + # Change public accessibility + if [ "$is_public" != "$old_is_public" ] + then + if [ "$is_public" = "1" ] + then + yunohost app action run $app public_private --args is_public=1 + else + yunohost app action run $app public_private --args is_public=0 + fi + fi #================================================= # MODIFY OVERWRITTING SETTINGS