Fixes for php-fpm service

This commit is contained in:
Alexey Berezhok
2024-04-08 22:09:24 +03:00
parent 68774baa01
commit e826a68bd3
7 changed files with 101 additions and 8 deletions

View File

@@ -103,7 +103,7 @@ prepare_web_backend() {
local backend_template=${1:-$template}
if [ -f "/etc/redhat-release" ]; then
pool=$(find -L /etc/opt/remi/php80/ -name "$domain.conf" -exec dirname {} \;)
pool=$(find -L /etc/opt/remi/php80/ -name "$domain.conf" -exec dirname {} \; 2>/dev/null)
else
pool=$(find -L /etc/php/ -name "$domain.conf" -exec dirname {} \;)
fi
@@ -121,7 +121,8 @@ prepare_web_backend() {
backend_version=$(multiphp_default_version)
if [ -z "$pool" ] || [ -z "$BACKEND" ]; then
if [ -f "/etc/redhat-release" ]; then
pool=$(find -L /etc/opt/remi/php80 -type d \( -name "pool.d" -o -name "*fpm.d" \))
m_backend_version="${backend_version//./}"
pool=$(find -L /etc/opt/remi/php$m_backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
else
pool=$(find -L /etc/php/$backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
fi

View File

@@ -14,7 +14,11 @@ BACKUP_DISK_LIMIT=95
BACKUP_LA_LIMIT=$(cat /proc/cpuinfo | grep processor | wc -l)
RRD_STEP=300
BIN=$HESTIA/bin
HESTIA_INSTALL_DIR="$HESTIA/install/deb"
if [ -f /etc/redhat-release ]; then
HESTIA_INSTALL_DIR="$HESTIA/install/rpm"
else
HESTIA_INSTALL_DIR="$HESTIA/install/deb"
fi
HESTIA_COMMON_DIR="$HESTIA/install/common"
HESTIA_BACKUP="/root/hst_backups/$(date +%d%m%Y%H%M)"
HESTIA_PHP="$HESTIA/php/bin/php"
@@ -1712,3 +1716,9 @@ search_command_arg_position() {
echo "$position"
}
# Convert version X.X to XX
convert_dot_version_to_non_dot() {
version="$1"
echo "${version//./}"
}