integrate.inc 795 B

12345678910111213141516171819
  1. #!/bin/bash
  2. hestia_module_phpmyadmin_integrate() {
  3. source $HESTIA/bin/module/func.inc
  4. # FIXME: use Nginx-web config when using Nginx proxy (ignore apache in that case)
  5. if [ "$WEB_SYSTEM" = 'nginx' ]; then
  6. # Setup Nginx config
  7. cp -f $HESTIA_INSTALL_DIR/nginx/phpmyadmin.inc $OSAL_PATH_NGINX_CONF_D/
  8. # Remove apache support
  9. hestia_safe_rm $OSAL_PATH_APACHE_CONF_D/phpmyadmin.conf
  10. elif [ "$WEB_SYSTEM" = 'apache2' ] || [ "$WEB_SYSTEM" = 'httpd' ]; then
  11. # Setup Apache config
  12. cp -f $HESTIA_INSTALL_DIR/pma/apache.conf /etc/phpmyadmin/
  13. ln -sf /etc/phpmyadmin/apache.conf $OSAL_PATH_APACHE_CONF_D/phpmyadmin.conf
  14. # Remove Nginx support
  15. hestia_safe_rm $OSAL_PATH_NGINX_CONF_D/phpmyadmin.inc
  16. fi
  17. }