Call daemon reload just in case#141
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Tools/PC/persist_journal.py helper script to retain more systemd journal data by increasing the configured disk usage cap and adjusting the service reload/restart sequence.
Changes:
- Increase journald
SystemMaxUsefrom10Gto50G. - Add a
systemctl daemon-reloadcall before restartingsystemd-journald.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| sp.run(["sudo", "systemctl", "daemon-reload"]) | ||
| sp.run(["sudo", "systemctl", "restart", "systemd-journald"]) |
There was a problem hiding this comment.
This script already exits unless it’s run as root (os.getuid() == 0), so invoking systemctl via sudo here is redundant and can break in environments without sudo or where sudo requires a TTY. Consider calling systemctl directly and using check=True so failures don’t get silently ignored.
Also, daemon-reload is intended for unit file changes; it doesn’t apply to journald.conf and can be removed unless there’s a specific unit/drop-in change this script makes.
and make the upper limit bigger