Add support for pre-installed PHP

This commit is contained in:
Shivam Mathur
2024-12-23 16:04:30 +05:30
parent b6d8115f12
commit da729085ef
5 changed files with 25 additions and 0 deletions

View File

@ -246,6 +246,7 @@ setup_php() {
step_log "Setup PHP"
sudo mkdir -m 777 -p /var/run /run/php
php_config="$(command -v php-config)"
check_pre_installed
if [[ -z "$php_config" ]] || [ "$(php_semver | cut -c 1-3)" != "$version" ]; then
if [ ! -e "/usr/bin/php$version" ] || [ ! -e "/usr/bin/php-config$version" ]; then
add_php >/dev/null 2>&1