cron script to clean up files
clean files that have been transcoded
This commit is contained in:
parent
12d992fa94
commit
64766508f0
17
ffmpeg-clean-temp-files.sh
Executable file
17
ffmpeg-clean-temp-files.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
set -e
|
||||
|
||||
if test -z "$TMP"; then
|
||||
TMP="/mnt/lvraid5"
|
||||
fi
|
||||
workdir=${workdir:-"$TMP/ffmpeg-cut-list.d"}
|
||||
cmd=${cmd:-"rm -f"}
|
||||
minage=${minage:-7}
|
||||
USER=${USER:-"mythtv"}
|
||||
|
||||
# delete old files
|
||||
find "$workdir" -depth -daystart -type f -mtime '+'${minage} -user ${USER} -execdir ${cmd} '{}' '+'
|
||||
|
||||
# end of file
|
||||
|
Loading…
Reference in New Issue
Block a user