install_postfixadmin.sh: Fix error in restarting PHP engine in case of installed ba debian package system.

This commit is contained in:
chris committed 2026-11-29 16:52:19 +01:00
1 parent 1278bfcfd0
commit 253eca42d4
1 file changed
+17 -7
+17 -7
View File
@@ -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