diff --git a/bin/v-edit-domain-php-ini b/bin/v-edit-domain-php-ini index 83d526139..351f34bc0 100644 --- a/bin/v-edit-domain-php-ini +++ b/bin/v-edit-domain-php-ini @@ -69,13 +69,18 @@ else nano "$config_file" fi -echo "Restarting PHP-FPM service for PHP version $fpm_ver..." +echo "Restarting PHP-FPM service for PHP version ${fpm_ver}" systemctl restart php${fpm_ver}-fpm -echo "The PHP-FPM service for PHP version 7.0 has been restarted successfully." +if [ $? -ne 0 ]; then + systemctl status php${fpm_ver}-fpm + check_result $E_RESTART "ERROR: php${fpm_ver}-fpm restart failed - please re-run the command and fix the problem !!!" +else + echo "The PHP-FPM service for PHP version ${fpm_ver} has been restarted successfully." +fi echo "" #----------------------------------------------------------# # Vesta # #----------------------------------------------------------# -exit 1; +exit 0; diff --git a/bin/v-edit-php-ini b/bin/v-edit-php-ini index 4806a48fc..696b60ec2 100644 --- a/bin/v-edit-php-ini +++ b/bin/v-edit-php-ini @@ -52,11 +52,15 @@ $editor_cmd "$php_ini_path" # Restart the PHP-FPM service for the selected version echo "Restarting the PHP-FPM service for PHP version $php_version..." systemctl restart php${php_version}-fpm - -echo "The PHP-FPM service for PHP version $php_version has been restarted successfully." +if [ $? -ne 0 ]; then + systemctl status php${php_version}-fpm + check_result $E_RESTART "ERROR: php${php_version}-fpm restart failed - please re-run the command and fix the problem !!!" +else + echo "The PHP-FPM service for PHP version ${php_version} has been restarted successfully." +fi #----------------------------------------------------------# # Exit # #----------------------------------------------------------# -exit +exit 0;