install.inc 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. # Integrate everything
  23. hestia package web-server integrate
  24. }
  25. usage() {
  26. echo "Hestia web server package."
  27. echo "Usage:"
  28. echo " hestia package install web-server \\"
  29. echo " [--with-proxy|--without-proxy]\\"
  30. echo " [--with-php|--without-php]"
  31. echo ""
  32. echo "Proxy and PHP packages will be installed hestia_config_backup 'nginx-remove' $OSAL_PATH_NGINX_CONFon systems"
  33. echo "with at least 1.5 GB of RAM, unless otherwise specified."
  34. }