graphene-os-server-infrastr.../deploy-journald
Daniel Micay ed1f869841 use more consistent journald max use and max file size
This switches all of the instances with only 20G to 25G storage to the
lower journald parameters. Since these are now most of the servers, the
default is changed and the ones with more storage are explicitly set to
use higher values.
2025-11-30 22:36:43 -05:00

19 lines
478 B
Bash
Executable file

#!/bin/bash
. shared.sh
. hosts.sh
for host in ${hosts_all[@]}; do
remote=root@$host
echo
echo $host
echo
cp etc/systemd/journald.conf tmp
sed -i "s/{{journald_system_max_use}}/${hosts_journald_system_max_use[$host]:-4G}/g" tmp
sed -i "s/{{journald_system_max_file_size}}/${hosts_journald_system_max_file_size[$host]:-256M}/g" tmp
rsync tmp $remote:/etc/systemd/journald.conf
rm tmp
ssh $remote systemctl reload systemd-journald
done