-
-
Notifications
You must be signed in to change notification settings - Fork 266
/
systemdconf
18 lines (13 loc) · 690 Bytes
/
systemdconf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function f_systemdconf {
echo "[$SCRIPT_COUNT] Systemd/system.conf and Systemd/user.conf"
sed -i 's/^#DumpCore=.*/DumpCore=no/' "$SYSTEMCONF"
sed -i 's/^#CrashShell=.*/CrashShell=no/' "$SYSTEMCONF"
sed -i 's/^#DefaultLimitCORE=.*/DefaultLimitCORE=0/' "$SYSTEMCONF"
sed -i 's/^#DefaultLimitNOFILE=.*/DefaultLimitNOFILE=1024/' "$SYSTEMCONF"
sed -i 's/^#DefaultLimitNPROC=.*/DefaultLimitNPROC=1024/' "$SYSTEMCONF"
sed -i 's/^#DefaultLimitCORE=.*/DefaultLimitCORE=0/' "$USERCONF"
sed -i 's/^#DefaultLimitNOFILE=.*/DefaultLimitNOFILE=1024/' "$USERCONF"
sed -i 's/^#DefaultLimitNPROC=.*/DefaultLimitNPROC=1024/' "$USERCONF"
systemctl daemon-reload
((SCRIPT_COUNT++))
}