install.inc 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. #!/bin/bash
  2. hestia_package_mail-server_install() {
  3. local 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 mail server package..."
  9. hestia module install exim
  10. hestia module install dovecot
  11. if [ $memory -ge 1572864 ] || [ "$param_withantivirus" ]; then
  12. if [ ! "$param_withoutantivirus" ]; then
  13. hestia module install clamav
  14. fi
  15. fi
  16. if [ $memory -ge 1572864 ] || [ "$param_withantispam" ]; then
  17. if [ ! "$param_withoutantispam" ]; then
  18. hestia module install spamassassin
  19. fi
  20. fi
  21. }
  22. usage() {
  23. echo "Hestia mail server package."
  24. echo "Usage:"
  25. echo " hestia package install mail-server \\"
  26. echo " [--withantivirus|--withoutantivirus]\\"
  27. echo " [--withantispam|--withoutantispam]"
  28. echo ""
  29. echo "Antivirus and antispam packages will install on systems"
  30. echo "with at least 1.5 GB of RAM, unless otherwise specified."
  31. }