From 58dcf45bd904380cfeeba8efbc49ed1cb735ede1 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 18 Dec 2020 16:55:39 +0100 Subject: [PATCH] do not reload php7.3 too fast --- data/helpers.d/php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/data/helpers.d/php b/data/helpers.d/php index 8bb82b5c2..bd5608594 100644 --- a/data/helpers.d/php +++ b/data/helpers.d/php @@ -270,12 +270,12 @@ WantedBy=multi-user.target ynh_systemd_action --service_name=$fpm_service --action=restart else # Validate that the new php conf doesn't break php-fpm entirely - php-fpm${phpversion} --test 2>/dev/null \ - && ynh_systemd_action --service_name=$fpm_service --action=reload \ - || { php-fpm${phpversion} --test || true; - ynh_secure_remove --file="$finalphpconf"; - ynh_die --message="The new configuration broke php-fpm?"; - } + if ! php-fpm${phpversion} --test 2>/dev/null + then + php-fpm${phpversion} --test || true; + ynh_secure_remove --file="$finalphpconf"; + ynh_die --message="The new configuration broke php-fpm?"; + fi ynh_systemd_action --service_name=$fpm_service --action=reload fi }