use systemd dropin configs
This commit is contained in:
parent
1ebd3013fb
commit
81c14cd885
1 changed files with 22 additions and 5 deletions
27
archmate.sh
27
archmate.sh
|
|
@ -470,13 +470,30 @@ EOF
|
||||||
COMMIT
|
COMMIT
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# systemd tweaks
|
# keep the journal small
|
||||||
sed -i.bak 's/^#SystemMaxUse=.*/SystemMaxUse=50M/g' /etc/systemd/journald.conf
|
mkdir -p /etc/systemd/journald.conf.d
|
||||||
sed -i.bak 's/^#KillUserProcesses=.*/KillUserProcesses=yes/g' /etc/systemd/logind.conf
|
cat << 'EOF' > /etc/systemd/journald.conf.d/logtime.conf
|
||||||
sed -i.bak 's/^#Storage=.*/Storage=none/g' /etc/systemd/coredump.conf
|
[Journal]
|
||||||
|
MaxRetentionSec=1week
|
||||||
|
SystemMaxUse=50M
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# kill user processes on logout
|
||||||
|
mkdir -p /etc/systemd/logind.conf.d
|
||||||
|
cat << 'EOF' > /etc/systemd/logind.conf.d/killprocs.conf
|
||||||
|
[Login]
|
||||||
|
KillUserProcesses=yes
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# don't save coredumps
|
||||||
|
mkdir -p /etc/systemd/coredump.conf.d
|
||||||
|
cat << 'EOF' > /etc/systemd/coredump.conf.d/storage.conf
|
||||||
|
[Coredump]
|
||||||
|
Storage=none
|
||||||
|
EOF
|
||||||
echo 'kernel.core_pattern=' > /etc/sysctl.d/50-coredump.conf
|
echo 'kernel.core_pattern=' > /etc/sysctl.d/50-coredump.conf
|
||||||
|
|
||||||
# desktop system, not being able to strace other PIDs is a PITA
|
# allow strace of own processes
|
||||||
echo 'kernel.yama.ptrace_scope=0' > /etc/sysctl.d/10-ptrace.conf
|
echo 'kernel.yama.ptrace_scope=0' > /etc/sysctl.d/10-ptrace.conf
|
||||||
|
|
||||||
logact systemctl enable lightdm.service
|
logact systemctl enable lightdm.service
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue