diff --git a/AMHScript b/AMHScript index 696c954..8dfef43 100644 --- a/AMHScript +++ b/AMHScript @@ -20,6 +20,13 @@ function amh_module_install() if amh_module_status ; then exit; else + #Fix 'Too many open files' Error + if ! cat /etc/security/limits.conf | grep -q '* soft nofile 40960'; then + echo '* soft nofile 40960' >> /etc/security/limits.conf; + fi; + if ! cat /etc/security/limits.conf | grep -q '* hard nofile 40960'; then + echo '* hard nofile 40960' >> /etc/security/limits.conf; + fi; #Delete other version for module_name in `ls /root/amh/modules/ | grep 'HYProxy' | grep -v 'HYProxy-1.0'`; do #amh module $module_name uninstall force;