|
|
@@ -87,21 +87,26 @@ prepare_web_backend() {
|
|
|
# Accept first function argument as backend template otherwise fallback to $template global variable
|
|
|
local backend_template=${1:-$template}
|
|
|
|
|
|
- pool=$(find -L /etc/php/ -name "$domain.conf" -exec dirname {} \;)
|
|
|
+ pool=$(find -L $PHP_DIR_POOL_D_BASE/ -name "$domain.conf" -exec dirname {} \;)
|
|
|
# Check if multiple-PHP installed
|
|
|
regex="socket-(\d+)_(\d+)"
|
|
|
if [[ $backend_template =~ ^.*PHP-([0-9])\_([0-9])$ ]]; then
|
|
|
+ echo 1
|
|
|
backend_version="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
|
|
|
- pool=$(find -L /etc/php/$backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
|
|
|
+ #pool=$(find -L /etc/php/$backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
|
|
|
+ pool=$(osal_multiphp_fpm_pool_d $backend_version)
|
|
|
else
|
|
|
+ echo 2
|
|
|
backend_version=$(multiphp_default_version)
|
|
|
- if [ -z "$pool" ] || [ -z "$BACKEND" ]; then
|
|
|
- pool=$(find -L /etc/php/$backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
|
|
|
+ if [ -z "$pool" ] || [ -z "$BACKEND" ]; then
|
|
|
+ #pool=$(find -L /etc/php/$backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
|
|
|
+ pool=$(osal_multiphp_fpm_pool_d $backend_version)
|
|
|
+ echo 3
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
if [ ! -e "$pool" ]; then
|
|
|
- check_result $E_NOTEXIST "php-fpm pool doesn't exist"
|
|
|
+ check_result $E_NOTEXIST "php-fpm pool doesn't exist ($pool / $backend_template)"
|
|
|
fi
|
|
|
backend_type="$domain"
|
|
|
if [ "$WEB_BACKEND_POOL" = 'user' ]; then
|