integrate.inc 820 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. hestia_module_php_integrate() {
  3. source $HESTIA/bin/module/func.inc
  4. if hestia_module_isinstalled 'apache'; then
  5. local php_variant=$(hestia_module_variant_installed 'php')
  6. if [ "$php_variant" = 'php-fpm' ]; then
  7. # Enable mod_ruid/mpm_itk or mpm_event
  8. # Disable prefork and php, enable event
  9. osal_apache_module_disable php$fpm_v > /dev/null 2>&1
  10. osal_apache_module_disable mpm_prefork > /dev/null 2>&1
  11. osal_apache_module_enable mpm_event > /dev/null 2>&1
  12. cp -f $HESTIA_INSTALL_DIR/$WEB_SYSTEM/hestia-event.conf $OSAL_PATH_APACHE_CONF_D/
  13. elif [ "$php_variant" = 'ruid2' ]; then
  14. # FIXME: enable only if needed
  15. osal_apache_module_enable ruid2 > /dev/null 2>&1
  16. fi
  17. fi
  18. }