mirror of
https://github.com/community-scripts/ProxmoxVED.git
synced 2026-02-25 05:57:26 +00:00
Refactor dev MOTD/SSH setup and journal cleanup
Moved MOTD/SSH setup for dev mode in LXC containers to run after installation and when containers are kept for debugging, improving reliability and clarity. Updated journalctl cleanup to avoid using $STD and suppress errors if systemd-journald is not initialized. Also refactored indentation in misc/api.func for consistency.
This commit is contained in:
@@ -834,8 +834,9 @@ cleanup_lxc() {
|
||||
if command -v composer &>/dev/null; then $STD composer clear-cache || true; fi
|
||||
|
||||
if command -v journalctl &>/dev/null; then
|
||||
$STD journalctl --rotate || true
|
||||
$STD journalctl --vacuum-time=10m || true
|
||||
# Journal rotation may fail if systemd-journald not fully initialized yet
|
||||
journalctl --rotate 2>/dev/null || true
|
||||
journalctl --vacuum-time=10m 2>/dev/null || true
|
||||
fi
|
||||
msg_ok "Cleaned"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user