diff options
author | Leonard Kugis <leonard@kug.is> | 2025-09-09 02:50:52 +0200 |
---|---|---|
committer | Leonard Kugis <leonard@kug.is> | 2025-09-09 02:50:52 +0200 |
commit | 7c3c378266dfa4cef287313ba5be53be4c30c304 (patch) | |
tree | 25ee4b94450e222545e4ebba25c8a72ec10b7862 | |
parent | 5c36e23afb99e262bdc35b9fb3537ef5664e39e8 (diff) | |
download | squashfu-master.tar.gz |
-rwxr-xr-x | squashfu | 4 | ||||
-rw-r--r-- | squashfu.conf | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -237,6 +237,10 @@ action_backup () { fi done + if ((${#TRUNCATE_LOGS[@]} != 0)); then + find "${TRUNCATE_LOGS[@]}" -type f \( -name "*.log" -o -name "*.log.*" \) ! -name "*.gz" -exec truncate -s 0 {} \; -o -name "*.gz" -exec rm -f {} \; + fi + check_for_resquash [[ val=$? -gt 0 ]] && create_new_squash $val diff --git a/squashfu.conf b/squashfu.conf index cfd6da1..59dcee7 100644 --- a/squashfu.conf +++ b/squashfu.conf @@ -81,7 +81,10 @@ INCLUDES=( EXCLUDES=( /lost+found -/var/log ) #end excludes +TRUNCATE_LOGS=( +/var/log +) #end truncate logs + |