mirror of
https://github.com/actions/runner-images.git
synced 2025-12-11 03:27:05 +00:00
14 lines
313 B
Bash
14 lines
313 B
Bash
#!/bin/bash
|
|
|
|
# journalctl
|
|
if command -v journalctl; then
|
|
journalctl --rotate
|
|
journalctl --vacuum-time=1s
|
|
fi
|
|
|
|
# delete all .gz and rotated file
|
|
find /var/log -type f -regex ".*\.gz$" -delete
|
|
find /var/log -type f -regex ".*\.[0-9]$" -delete
|
|
|
|
# wipe log files
|
|
find /var/log/ -type f -exec cp /dev/null {} \; |