Browse Source

Update ipv4-ipv6.sh

molon 4 years ago
parent
commit
a80c977720
1 changed files with 8 additions and 0 deletions
  1. 8 0
      scripts/ipv4-ipv6.sh

+ 8 - 0
scripts/ipv4-ipv6.sh

@@ -218,6 +218,14 @@ systemctl restart 3proxy
 EOF
 EOF
 chmod +x ${WORKDIR}/boot_*.sh
 chmod +x ${WORKDIR}/boot_*.sh
 
 
+
+# change ulimit for too many open files
+grep -qxF '* soft nofile 1024000' /etc/security/limits.conf || cat >>/etc/security/limits.conf << "EOF" 
+
+* soft nofile 1024000
+* hard nofile 1024000
+EOF
+
 # qxF match whole line
 # qxF match whole line
 grep -qxF "bash $BOOTRCFILE" /etc/rc.local || cat >>/etc/rc.local <<EOF 
 grep -qxF "bash $BOOTRCFILE" /etc/rc.local || cat >>/etc/rc.local <<EOF 
 bash $BOOTRCFILE
 bash $BOOTRCFILE