Browse Source

new: [myc-update] add hard limit to system journal usage to 200M

master
Boris Gallet 9 months ago
committed by Valentin Lab
parent
commit
c6ec794d4b
  1. 9
      bin/myc-update

9
bin/myc-update

@ -113,6 +113,15 @@ sed -ri 's/^# (export LS_OPTIONS=.--color=auto.)/\1/;
EOF
fi
## add option to limit log size
journalctl_config_file="/etc/systemd/journald.conf"
if [ -f "$journalctl_config_file" ] &&
! grep -q "^SystemMaxUse=" "$journalctl_config_file"; then
Wrap -d "Limit system journal logs to 200M" <<EOF || exit 1
sed -ri 's/^#SystemMaxUse=$/SystemMaxUse=200M/g' "$journalctl_config_file"
systemctl restart systemd-journald.service
EOF
fi
for keyfile in {/root,/home/debian}/.ssh/authorized_keys; do
[ -e "$keyfile" ] || continue

Loading…
Cancel
Save