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:
@@ -230,10 +230,11 @@ cleanup_location() {
|
||||
|
||||
done < <(find "$location" -type f -mmin +"$max_age" 2>/dev/null)
|
||||
|
||||
# Remove empty directories — but NEVER remove transcoding-temp
|
||||
# transcoding-temp must always exist on ramdisk so Emby finds it there first
|
||||
# Remove empty directories older than TRANSCODE_ORPHAN_AGE — but NEVER remove
|
||||
# transcoding-temp. Age gate avoids deleting a session folder ffmpeg just
|
||||
# created but hasn't written its first segment into yet.
|
||||
if [[ "$DRY_RUN" == false ]]; then
|
||||
find "$location" -mindepth 1 -type d -empty \
|
||||
find "$location" -mindepth 1 -type d -empty -mmin +"${TRANSCODE_ORPHAN_AGE:-30}" \
|
||||
! -name "transcoding-temp" -delete 2>/dev/null
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user