Reduce poudriere log retention to 30 days.

This commit is contained in:
Tom Alexander 2023-09-01 11:25:36 -04:00
parent 0f054f819f
commit 5e81006208
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -9,6 +9,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
: ${INFO_DIR:="/opt/poudriere/run_info"} : ${INFO_DIR:="/opt/poudriere/run_info"}
: ${PORT_UPDATE_SECONDS:="86400"} : ${PORT_UPDATE_SECONDS:="86400"}
: ${BUILD_SECONDS:="7200"} : ${BUILD_SECONDS:="7200"}
: ${LOG_RETENTION_DAYS:="30"}
############## Setup ######################### ############## Setup #########################
@ -103,7 +104,7 @@ function cmd_start {
LASTBUILD=$(date +%s) LASTBUILD=$(date +%s)
# Cleanup old unused dist files # Cleanup old unused dist files
poudriere distclean -y -p "$PORTS" -f /usr/local/etc/poudriere.d/$JAIL-$PORTS-$SET-pkglist poudriere distclean -y -p "$PORTS" -f /usr/local/etc/poudriere.d/$JAIL-$PORTS-$SET-pkglist
poudriere logclean -y 180 poudriere logclean -y "$LOG_RETENTION_DAYS"
fi fi
cat > "$TIMES_FILE" <<EOF cat > "$TIMES_FILE" <<EOF