|
@@ -65,13 +65,16 @@ sed -i 's/^HISTSIZE=.*$/HISTSIZE=100/' /etc/profile
|
|
|
[ -z "`cat ~/.bashrc | grep history-timestamp`" ] && echo "export PROMPT_COMMAND='{ msg=\$(history 1 | { read x y; echo \$y; });user=\$(whoami); echo \$(date \"+%Y-%m-%d %H:%M:%S\"):\$user:\`pwd\`/:\$msg ---- \$(who am i); } >> /tmp/\`hostname\`.\`whoami\`.history-timestamp'" >> ~/.bashrc
|
|
|
|
|
|
# /etc/security/limits.conf
|
|
|
-[ -z "`cat /etc/security/limits.conf | grep 'nproc 65535'`" ] && cat >> /etc/security/limits.conf <<EOF
|
|
|
+[ -e /etc/security/limits.d/*nproc.conf ] && rename nproc.conf nproc.conf_bk /etc/security/limits.d/*nproc.conf
|
|
|
+sed -i '/^# End of file/,$d' /etc/security/limits.conf
|
|
|
+cat >> /etc/security/limits.conf <<EOF
|
|
|
+# End of file
|
|
|
* soft nproc 65535
|
|
|
* hard nproc 65535
|
|
|
* soft nofile 65535
|
|
|
* hard nofile 65535
|
|
|
EOF
|
|
|
-[ -z "`cat /etc/rc.local | grep 'ulimit -SH 65535'`" ] && echo "ulimit -SH 65535" >> /etc/rc.local
|
|
|
+[ -z "`grep 'ulimit -SH 65535' /etc/rc.local`" ] && echo "ulimit -SH 65535" >> /etc/rc.local
|
|
|
|
|
|
# /etc/hosts
|
|
|
[ "$(hostname -i | awk '{print $1}')" != "127.0.0.1" ] && sed -i "s@^127.0.0.1\(.*\)@127.0.0.1 `hostname` \1@" /etc/hosts
|