Make ynh_add_fpm_config more robust to some edge cases

This commit is contained in:
Alexandre Aubin 2021-11-13 18:36:38 +01:00
parent 38f24c4518
commit 51d5dca033

View file

@ -90,9 +90,11 @@ ynh_add_fpm_config() {
local old_php_fpm_config_dir=$(ynh_app_setting_get --app=$app --key=fpm_config_dir)
local old_php_finalphpconf="$old_php_fpm_config_dir/pool.d/$app.conf"
ynh_backup_if_checksum_is_different --file="$old_php_finalphpconf"
ynh_remove_fpm_config
if [[ -f "$old_php_finalphpconf" ]]
then
ynh_backup_if_checksum_is_different --file="$old_php_finalphpconf"
ynh_remove_fpm_config
fi
fi
# Legacy args (packager should just list their php dependency as regular apt dependencies...