Skip to content

Commit

Permalink
Update LinuxInit.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
MoeClub authored May 11, 2022
1 parent 68c8890 commit ced66cd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LinuxInit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ if [ -f /etc/security/limits.conf ]; then
sed -i '/^\(\*\|root\)[[:space:]]*\(hard\|soft\)[[:space:]]*\(nofile\|memlock\)/d' /etc/security/limits.conf
echo -ne "*\thard\tmemlock\t${LIMIT}\n*\tsoft\tmemlock\t${LIMIT}\nroot\thard\tmemlock\t${LIMIT}\nroot\tsoft\tmemlock\t${LIMIT}\n*\thard\tnofile\t${LIMIT}\n*\tsoft\tnofile\t${LIMIT}\nroot\thard\tnofile\t${LIMIT}\nroot\tsoft\tnofile\t${LIMIT}\n\n" >>/etc/security/limits.conf
fi
if [ -f /etc/systemd/system.conf ]; then
sed -i 's/#\?DefaultLimitNOFILE=.*/DefaultLimitNOFILE=262144/' /etc/systemd/system.conf
fi

# timezone
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" >/etc/timezone
Expand Down

0 comments on commit ced66cd

Please sign in to comment.