Skip to content
Snippets Groups Projects
Commit ec09e960 authored by Holger Levsen's avatar Holger Levsen
Browse files

reproducible & everything: warn on files >8G in /var/log and fail maintenance...

reproducible & everything: warn on files >8G in /var/log and fail maintenance job if files >32G are found

Signed-off-by: default avatarHolger Levsen <holger@layer-acht.org>
parent 43fa8d16
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,23 @@ fi
#
set -e
#
# find too large files in /var/log
#
echo "$(date -u) - Looking for too large files in /var/log/"
TOOBIG=$(find /var/log -size +8G -exec ls -lah {} \; 2>/dev/null || true)
if [ ! -z "$TOOBIG" ] ; then
echo
echo "$(date -u) - Warning: too large files found in /var/log:"
echo "$TOOBIG"
echo
DIRTY=true
if $(find /var/log -size +32G /dev/null 2>&1) ; then
echo "$(date -u) - Error, more than 32gb is just wrong..."
exit 1
fi
fi
#
# delete old temp directories
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment