Added fixes for php manipulation and system config

This commit is contained in:
Alexey Berezhok
2024-06-14 00:14:42 +03:00
parent 12d787ea87
commit b52ec2c862
8 changed files with 158 additions and 39 deletions

View File

@@ -38,7 +38,11 @@ if [ -z "$WEB_BACKEND" ]; then
fi
# Set file locations
php_fpm="/etc/init.d/php$version-fpm"
if [ -f /etc/redhat-release ]; then
php_fpm="/usr/lib/systemd/system/php$version-php-fpm.service"
else
php_fpm="/etc/init.d/php$version-fpm"
fi
# Verify php version format
if [ -f /etc/redhat-release ]; then
@@ -74,16 +78,16 @@ check_hestia_demo_mode
# Action #
#----------------------------------------------------------#
mph="php$version-common php$version-mbstring php$version-bcmath php$version-cli php$version-curl
mph="php$version-common php$version-mbstring php$version-bcmath php$version-cli php$version-curl
php$version-fpm php$version-gd php$version-intl php$version-mysql
php$version-soap php$version-xml php$version-zip php$version-json php$version-bz2
php$version-pspell php$version-imagick php$version-pgsql php$version-imap php$version-ldap"
if [ -f /etc/redhat-release ]; then
# Packages in Remi repo have names with php$version-php- prefixes
mph="php$version-php-fpm php$version-php-cgi php$version-php-mysqlnd php$version-php-pgsql
php$version-php-pdo php$version-php-common php$version-php-pecl-imagick php$version-php-imap
php$version-php-ldap php$version-php-pecl-apcu php$version-php-pecl-zip php$version-php-cli
php$version-php-opcache php$version-php-xml php$version-php-gd php$version-php-intl
mph="php$version-php-fpm php$version-php-cgi php$version-php-mysqlnd php$version-php-pgsql
php$version-php-pdo php$version-php-common php$version-php-pecl-imagick php$version-php-imap
php$version-php-ldap php$version-php-pecl-apcu php$version-php-pecl-zip php$version-php-cli
php$version-php-opcache php$version-php-xml php$version-php-gd php$version-php-intl
php$version-php-mbstring php$version-php-pspell php$version-php-readline"
if [ "$version" = "56" ]; then
mph=$(sed -e "s/php$version-php-pecl-apcu//")
@@ -139,6 +143,13 @@ if [ ! -f "$php_fpm" ]; then
fi
fi
if [ -f '/etc/redhat-release' ]; then
result_alt_php=$(alternatives --display php | grep /usr/bin/php$version)
if [ -z "$result_alt_php" ]; then
alternatives --install /usr/bin/php php /usr/bin/php$version 1 > /dev/null 2>&1
fi
fi
# Check if required modules for apache2 are enabled
if [ "$WEB_SYSTEM" = "apache2" ]; then
if [ -f /etc/redhat-release ]; then