install.inc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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_withproxy" ]; then
  12. if [ ! "$param_withoutproxy" ]; then
  13. hestia module install nginx --no-integrate
  14. fi
  15. fi
  16. if [ $memory -ge 1572864 ] || [ "$param_withphp" ]; then
  17. if [ ! "$param_withoutphp" ]; then
  18. hestia module install php-fpm --no-integrate
  19. fi
  20. fi
  21. # Integrate everything
  22. hestia package web-server integrate
  23. }
  24. usage() {
  25. echo "Hestia web server package."
  26. echo "Usage:"
  27. echo " hestia package install web-server \\"
  28. echo " [--withproxy|--withoutproxy]\\"
  29. echo " [--withphp|--withoutphp]"
  30. echo ""
  31. echo "Proxy and PHP packages will be installed hestia_config_backup 'nginx-remove' $OSAL_PATH_NGINX_CONFon systems"
  32. echo "with at least 1.5 GB of RAM, unless otherwise specified."
  33. }