install.inc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. hestia_package_web-server_install() {
  3. memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
  4. if [ "$param_help" ]; then
  5. usage
  6. return 0
  7. fi
  8. echo "Installing web server package..."
  9. hestia module install apache --no-integrate
  10. hestia module install awstats --no-integrate
  11. if [ $memory -ge 1572864 ] || [ "$param_with_proxy" ]; then
  12. if [ ! "$param_without_proxy" ]; then
  13. hestia module install nginx --no-integrate
  14. fi
  15. fi
  16. if [ $memory -ge 1572864 ] || [ "$param_with_php" ]; then
  17. if [ ! "$param_without_php" ]; then
  18. hestia module install php --no-integrate
  19. hestia module install php-fpm --no-integrate
  20. fi
  21. fi
  22. if [ ! "$param_without_mariadb" ]; then
  23. hestia module install mariadb --no-integrate
  24. fi
  25. # Integrate everything
  26. hestia package web-server integrate
  27. }
  28. usage() {
  29. echo "Hestia web server package."
  30. echo "Usage:"
  31. echo " hestia package install web-server \\"
  32. echo " [--with-proxy|--without-proxy]\\"
  33. echo " [--with-php|--without-php]"
  34. echo ""
  35. echo "Proxy and PHP packages will be installed hestia_config_backup 'nginx-remove' $OSAL_PATH_NGINX_CONFon systems"
  36. echo "with at least 1.5 GB of RAM, unless otherwise specified."
  37. }