Wire up unused config vars found in follow-up audit pass
TRANSCODE_LOG_RETENTION was documented as trimming the daily transcode log but never referenced — log grew unbounded. TRANSCODE_ORPHAN_AGE was shown in --status but never used, so empty session folders were deleted immediately instead of after the documented grace period, risking a race against ffmpeg creating a folder just before writing its first segment. docker_watchdog.sh's daemon-health thresholds were only hardcoded fallbacks despite comments claiming they were master.conf-configurable, and it referenced a heartbeat feature that was never implemented (that's owned by watchdog_orchestrator.sh, its caller) — added the three thresholds to master.conf for real and removed the stale heartbeat claim. Also added the missing HOSTN_PARTNERSHIP_SERVICES_STACK block to host.conf.template (containers.sh already read it via detect_hosts, just never had a template entry) and corrected play_state_sync.sh's doc comment for PLAY_SYNC_TYPES' actual default.
This commit is contained in:
@@ -647,6 +647,14 @@ if [[ "$DRY_RUN" == false && "$NO_LOG" == false && -n "${TRANSCODE_DAILY_LOG:-}"
|
||||
echo "${TODAY}|${RAMDISK_USED_GB}|${FLIP_COUNT}|${RAM_SESSION_COUNT}|${SSD_SESSION_COUNT}" \
|
||||
>> "$TRANSCODE_DAILY_LOG" 2>/dev/null || true
|
||||
log "Daily log written: $TRANSCODE_DAILY_LOG"
|
||||
|
||||
# Trim entries older than TRANSCODE_LOG_RETENTION days
|
||||
LOG_CUTOFF=$(date -d "${TRANSCODE_LOG_RETENTION:-90} days ago" '+%Y-%m-%d' 2>/dev/null)
|
||||
if [[ -n "$LOG_CUTOFF" ]]; then
|
||||
awk -F'|' -v cutoff="$LOG_CUTOFF" '$1 >= cutoff' "$TRANSCODE_DAILY_LOG" \
|
||||
> "${TRANSCODE_DAILY_LOG}.tmp" 2>/dev/null && \
|
||||
mv "${TRANSCODE_DAILY_LOG}.tmp" "$TRANSCODE_DAILY_LOG"
|
||||
fi
|
||||
fi
|
||||
|
||||
# ==============================================================================================
|
||||
|
||||
Reference in New Issue
Block a user