14 lines
417 B
Bash
Executable File
14 lines
417 B
Bash
Executable File
#!/bin/bash
|
|
|
|
USER_NAME=$1
|
|
USER_HOME=$2
|
|
USER_SHELL=$3
|
|
|
|
sed -i "s#d5000#${USER_NAME}#g" /etc/cgconfig.conf
|
|
sed -i "s#d5000#${USER_NAME}#g" /etc/cgrules.conf
|
|
grep ^${USER_NAME} /etc/security/limits.conf|grep nproc &>/dev/null
|
|
if [ $? -ne 0 ];then
|
|
echo "${USER_NAME} soft nproc 10240">>/etc/security/limits.conf
|
|
echo "${USER_NAME} hard nproc 10240">>/etc/security/limits.conf
|
|
fi
|