Add snippet 'get-path-of-php-command.sh' and change concerning code..

This commit is contained in:
2023-08-03 00:11:02 +02:00
parent 1df7bb124b
commit d84294cf0b
18 changed files with 287 additions and 117 deletions

View File

@ -306,13 +306,11 @@ source ${snippet_dir}/get-webservice-environment.sh
#
source ${snippet_dir}/get-php-major-version.sh
if [[ -x "/usr/local/php-${PHP_VERSION}/bin/php" ]] ; then
PHP_BIN="/usr/local/php-${PHP_VERSION}/bin/php"
elif [[ -x "$(realpath /usr/local/php/bin/php)" ]]; then
PHP_BIN="/usr/local/php/bin/php"
else
PHP_BIN="$(which php)"
fi
# Get full qualified PHP command
#
source ${snippet_dir}/get-path-of-php-command.sh
if [[ ! -x "$PHP_BIN" ]]; then
fatal "No PHP binary found!"