diff --git a/install_postfixadmin.sh b/install_postfixadmin.sh index 1bd9d2d..fadbbfb 100755 --- a/install_postfixadmin.sh +++ b/install_postfixadmin.sh @@ -3746,6 +3746,7 @@ if [[ -n "$php_major_versions" ]]; then fi else echo_skipped + warn "Neither an init-script nor a service file for PHP v${_ver} found!" fi done else @@ -3753,17 +3754,26 @@ else echononl " Retart PHP FPM engine v${php_major_version}.." if [[ -f "/etc/init.d/php$(echo $php_major_version | cut -d'.' -f1)-fpm" ]] ; then /etc/init.d/php$(echo $php_major_version | cut -d'.' -f1)-fpm restart > $log_file 2>&1 + if [[ $? -eq 0 ]]; then + echo_ok + else + echo_failed + error "$(cat $log_file)" + fi + elif [[ -f "/usr/lib/systemd/system/php${php_major_version}-fpm.service" ]] ; then + systemctl restart php8.4-fpm.service > $log_file 2>&1 + if [[ $? -eq 0 ]]; then + echo_ok + else + echo_failed + error "$(cat $log_file)" + fi else echo_skipped - fi - if [[ $? -eq 0 ]]; then - echo_ok - else - echo_failed - error "$(cat $log_file)" + warn "Neither an init-script nor a service file for PHP v${php_major_version} found!" fi else - echo_skipped + warn "No PHP installation found!" fi fi