From 51d5dca03387d18842388379b5177b6e83833e4d Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 13 Nov 2021 18:36:38 +0100 Subject: [PATCH] Make ynh_add_fpm_config more robust to some edge cases --- data/helpers.d/php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/data/helpers.d/php b/data/helpers.d/php index b0e9fa59d..d6ccc52cd 100644 --- a/data/helpers.d/php +++ b/data/helpers.d/php @@ -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...