nginx: Fix removing old logs
This commit is contained in:
parent
a226b1d560
commit
80ac346c4e
1 changed files with 1 additions and 1 deletions
|
@ -20,7 +20,7 @@ for log in *.log ; do
|
|||
find_rotated "$log" | while read -r name; do
|
||||
num="$(echo "$name" | awk -F. '{ print $NF }')"
|
||||
if [ "$num" -gt 7 ]; then
|
||||
rm -f "$log"
|
||||
rm -f "${log}.${num}"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
|
Loading…
Add table
Reference in a new issue