2020-06-28 22:11:42 -04:00
|
|
|
#!/bin/bash
|
|
|
|
set -aex
|
|
|
|
|
|
|
|
export LANG=en_US.UTF-8
|
2020-07-12 16:59:13 -04:00
|
|
|
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
|
2020-07-23 09:10:14 -04:00
|
|
|
# ugly kludge due to upgrade from 16.04 to 18.04 mismatch
|
2020-12-08 13:38:57 -05:00
|
|
|
# export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:/tmp/root-snap-2020-06-28-21-56-27/usr/lib/x86_64-linux-gnu
|
|
|
|
export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
|
2020-06-28 22:11:42 -04:00
|
|
|
unset -v LANGUAGE
|
|
|
|
|
|
|
|
working_dir=${working_dir:-"/mnt/lvraid5/ffmpeg-cut-list.d"}
|
|
|
|
error_log=${error_log:-"user-job-$(date +'%Y-%m-%d-%H%M').err"}
|
|
|
|
outpt_log=${error_log/err/log}
|
2021-04-18 07:33:41 -04:00
|
|
|
debug=${debug:-"eval nice -n 19 ionice -c 3 "}
|
2020-06-28 22:11:42 -04:00
|
|
|
ffmpeg_myth_scm=${ffmpeg_myth_scm:-"/usr/local/bin/ffmpeg-myth.scm"}
|
2020-10-23 14:26:02 -04:00
|
|
|
|
|
|
|
if test -z "$*"; then
|
|
|
|
job=${job:-"ffmpeg-myth-do-pending-jobs 4"}
|
|
|
|
else
|
|
|
|
job="$*"
|
|
|
|
fi
|
2020-06-28 22:11:42 -04:00
|
|
|
|
|
|
|
cmd="$ffmpeg_myth_scm $job"
|
|
|
|
|
|
|
|
(cd "$working_dir" && printenv && $debug $cmd) >> $working_dir/$outpt_log 2>> $working_dir/$error_log
|
|
|
|
|