|
|
@@ -66,15 +66,26 @@ hestia_package_web-server_integrate() {
|
|
|
|
|
|
|
|
|
|
|
|
- # *** PHP (FPM and CLI)
|
|
|
+ # *** PHP (CLI)
|
|
|
if hestia_module_isinstalled 'php'; then
|
|
|
+ # Update default CLI version
|
|
|
+ if [ "$OS_BASE" = 'debian' ]; then
|
|
|
+ update-alternatives --set php /usr/bin/php$PHP_DEFAULT_VERSION > /dev/null 2>&1
|
|
|
+ elif [ "$OS_BASE" == 'rhel' ]; then
|
|
|
+ local php_withoutdot=${PHP_DEFAULT_VERSION//.}
|
|
|
+ ln -sf /usr/bin/php$php_withoutdot /usr/bin/php
|
|
|
+ fi
|
|
|
+ fi
|
|
|
+
|
|
|
+ # *** PHP (FPM)
|
|
|
+ if hestia_module_isinstalled 'php-fpm'; then
|
|
|
echo "Integrating PHP..."
|
|
|
source $HESTIA/bin/module/php/func.inc
|
|
|
for php_version in $PHP_SUPPORTED_VERSIONS; do
|
|
|
local php_withoutdot=${php_version//.}
|
|
|
- php_version_present=$(osal_kv_read $HESTIA_CONF_MODULES/php.conf "php${php_withoutdot}_present" 0)
|
|
|
+ php_version_present=$(osal_kv_read $HESTIA_CONF_MODULES/php-fpm.conf "php${php_withoutdot}_present" 0)
|
|
|
if [ "$php_version_present" == "1" ]; then
|
|
|
- echo " Enabling PHP $php_version"
|
|
|
+ echo " Enabling PHP (FPM) $php_version"
|
|
|
local php_prefix=$(osal_php_package_prefix $php_version)
|
|
|
osal_service_enable $php_prefix-fpm
|
|
|
osal_service_restart $php_prefix-fpm
|
|
|
@@ -89,18 +100,8 @@ hestia_package_web-server_integrate() {
|
|
|
osal_apache_module_enable mpm_event > /dev/null 2>&1
|
|
|
cp -f $HESTIA_INSTALL_DIR/$WEB_SYSTEM/hestia-event.conf $OSAL_PATH_APACHE_CONF_D/
|
|
|
fi
|
|
|
-
|
|
|
- # Update default CLI version
|
|
|
- if [ "$OS_BASE" = 'debian' ]; then
|
|
|
- update-alternatives --set php /usr/bin/php$PHP_DEFAULT_VERSION > /dev/null 2>&1
|
|
|
- elif [ "$OS_BASE" == 'rhel' ]; then
|
|
|
- local php_withoutdot=${PHP_DEFAULT_VERSION//.}
|
|
|
- ln -sf /usr/bin/php$php_withoutdot /usr/bin/php
|
|
|
- fi
|
|
|
fi
|
|
|
|
|
|
-
|
|
|
-
|
|
|
# *** Rebuild IPs and domains
|
|
|
if [ "$apache_installed" ] || [ "$nginx_installed" ] ; then
|
|
|
# Install default success page
|
|
|
@@ -111,7 +112,7 @@ hestia_package_web-server_integrate() {
|
|
|
cp -rf $HESTIA_INSTALL_DIR/templates/web/skel/document_errors/* /var/www/document_errors/
|
|
|
fi
|
|
|
|
|
|
- hestia package web-server setup-ips
|
|
|
+ hestia package web-server setup-ips > /dev/null 2>&1
|
|
|
|
|
|
# Rebuild domains
|
|
|
echo "Rebuilding web domains..."
|