Delete empty error files at the end
This commit is contained in:
parent
d29aa7887c
commit
a2976936bf
2 changed files with 6 additions and 0 deletions
|
@ -13,6 +13,7 @@ The **patch** part changes is incremented if multiple releases happen the same m
|
|||
### Added
|
||||
|
||||
* Store iptables/nft stderr output in special files
|
||||
* … and delete the empty ones at the end
|
||||
|
||||
### Changed
|
||||
|
||||
|
|
|
@ -762,6 +762,10 @@ task_systemctl() {
|
|||
fi
|
||||
}
|
||||
|
||||
clean_empty_error_file() {
|
||||
find "${dump_dir}" -type f -name "*.err" -size 0 -delete
|
||||
}
|
||||
|
||||
main() {
|
||||
if [ -z "${dump_dir}" ]; then
|
||||
echo "ERROR: You must provide the --dump-dir argument" >&2
|
||||
|
@ -841,6 +845,7 @@ main() {
|
|||
task_systemctl
|
||||
fi
|
||||
|
||||
clean_empty_error_file
|
||||
|
||||
debug "=> Your dump is available at ${dump_dir}"
|
||||
exit ${rc}
|
||||
|
|
Loading…
Reference in a new issue