Update resize_journal.sh

This commit is contained in:
spiritLHLS 2022-12-17 23:58:11 +08:00 committed by GitHub
parent 89c37e58dc
commit 43bd0bd404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,10 +93,7 @@ main() {
fi
# Restart the log recording service to force log rotation
systemctl restart systemd-journald
if [ $? -ne 0 ]; then
systemctl restart rsyslog
fi
sudo systemctl kill --kill-who=main --signal=SIGUSR2 systemd-journald.service
# Loop for 10 seconds, printing journald disk usage every second